Secretary of State William “Bill’’ Gardner has his office for another two years. That is good news for New Hampshire; but the fact that this nonpolitical public servant nearly lost due to partisanship and one man’s political greed and ambition is a warning to us all.

If Gardner’s opponent still wants to attain high political office, he might try something more than changing his name again or counting on large companies to bankroll his efforts.

After his latest loss, such entities may want to rethink their help.

Meanwhile, Gardner and his capable staff will continue to go about their work in an office that has been above reproach, and politics, for decades.

We hope the new Legislature will, when addressing election issues, take advantage of Gardner’s experience and perspective. And that includes any changes contemplated regarding town meeting day and fickle weather.

A bare majority of legislators realized that the effort to remove Gardner and turn his office into a political shop was a terrible idea.

They, and all of us in New Hampshire, must remember what almost happened.

The next presidential primary is probably a little more than a year away. Both major political parties know that they and their candidates will get a fair shake from Gardner. But they should also know that no party or individual candidate can intimidate this quiet, humble man.

Of course, the loser in last week’s race is free to enter the 2020 presidential primary.

He could run as a favorite son. Or maybe not.

But at least he surely knows that he would get a fair shake should he file at the Secretary of State’s office.