America has lost a hero, a patriot and a senator whose unflinching candor, humility and commitment to putting the public good over partisan alliances personified everything that is good — and so maddeningly rare — about modern politics.

Sen. John McCain, who died Saturday at 81, was the ultimate public servant.

Well-deserved tributes poured in from across the nation, across the aisle and across the spectrum from beneficiaries and targets of the Arizona senator’s straight talk.

Our editorial board has experienced both sides of McCain. We were favorably impressed when he met with us as a presidential candidate in 2000 — we endorsed him in his unsuccessful bid for the Republican nomination — and again when he joined Sen. Russ Feingold, D-Wis., to pitch their bipartisan campaign finance reform act. We also were the recipients of a decidedly testy letter to the editor from McCain when he took great issue with an editorial about his resistance to a BART-to-SFO funding plan in February 1997.

Therein lies the character of John McCain. He was never one to pander or obfuscate.

McCain’s was a life of defining moments. The most consequential was the day in 1967 his Navy A-4 Skyhawk aircraft was shot down over Hanoi, and the seriously injured pilot, son of an admiral, became the enemy’s most prized prisoner of war. He was tortured, held in solitary confinement for long periods — yet refused early release out of respect to his fellow prisoners and contempt for the notion he would become a propaganda tool.

It’s no wonder McCain proved so fearless and resilient in politics, whether taking a stand against torture, breaking GOP ranks to preserve the Affordable Care Act, championing campaign reform or politely but firmly correcting a supporter at a town hall who suggested his opponent, Democratic presidential nominee Barack Obama, was “an Arab” and untrustworthy.

John McCain never left Americans wondering what he thought. He always went beyond the call of duty for the principles he embraced and the nation he served.

This commentary is from The Chronicle’s editorial board. We invite you to express your views in a letter to the editor. Please submit your letter via our online form: SFChronicle.com/letters.