Editor’s Note: Timothy Stanley is a historian and columnist for Britain’s Daily Telegraph. He is the author of “Citizen Hollywood: How the Collaboration Between LA and DC Revolutionized American Politics.” The opinions expressed in this commentary are his. View more opinion articles on CNN.

CNN  — 

John McCain once took on Hillary Clinton in a drinking contest. It was at a restaurant in Estonia in 2004, during a congressional tour. Both politicians managed four shots of vodka; the rules were unclear, but Hillary – McCain’s one-time political rival – was declared the winner, according to the restaurant proprietor (though in her own account, Clinton said they “agreed to withdraw in honorable fashion,” rather than name a winner).

Timothy Stanley

That image sums up the humanity and character of the late Senator McCain, who will be mourned deeply on both sides of the political aisle. He embodied a more moderate brand of conservatism – one that could separate politics and friendship – that now feels distant and very much missed.

He should have been elected President in 2000, when he ran for the Republican nomination and lost, and if he had made it to the White House, America might have forged a new consensus around a smaller state and a cleaner politics.

Today the country is divided in ways that McCain despaired of. But it should be united in grief for a genuine American hero.

When McCain tried again for the presidency in 2008, this time winning the Republican nomination, the country found itself blessed with real choice. Barack Obama, the Democratic nominee, was intelligent and eloquent, the voice of young America. McCain represented the best that the previous generation had to offer.

The scion of a military family, McCain was captured by the North Vietnamese in 1967 and tortured. He remained imprisoned for over five years, refusing early release until every man who had been taken before him was let go. When he was accused of being a carpetbagger during a congressional run in 1982, McCain replied that although he wished he had spent his whole life in Arizona’s comfortable first district “I was doing other things. As a matter of fact, when I think about it now, the place I lived longest in my life was Hanoi.”

By the time McCain entered the Senate in 1987, the Republican Party was solidifying around the ideological core of economic and social conservatism. McCain was a conservative, too, but his personal philosophy harked back to a tradition of limited government and individual free will, to be enjoyed by lawmakers as well as voters.

When George W Bush tried to capture the Republican nomination in 2000 with a rich alliance of tax-cutters and brimstone preachers, McCain ran on a rebellious ticket of campaign finance reform. It was a fierce, unpleasant fight that at times seemed to push McCain outside his party altogether. He called Pat Robertson and Jerry Falwell “agents of intolerance.” He voted against Bush’s tax cuts in the Senate – on the old-fashioned grounds that they were overly generous to the rich. The image of McCain the Maverick elevated him in the eyes of many American Democrats and independents.

But his support for the 2003 Iraq War did him much damage. His critics accused him of performing countless u-turns in the Bush years, of trying to court the extremes of the Republican coalition that he once opposed in order to smooth his second shot for the presidency. This was unfair. McCain’s support for the military and his belief in America’s unique, indispensable role in world affairs was consistent.

But be it patriotism or calculation that brought about the rapprochement with Bush, the consequence was tragic. In 2008 McCain, now head of the Republican Party, found himself defending the legacy of exactly the kind of conservatism he once opposed, including backing a bailout for Wall Street in response to the credit crunch – perhaps the greatest example in history of “pork barrel politics”.

And as he struggled to catch Barack Obama in the polls, McCain made the fateful decision to pick Sarah Palin as his vice presidential running mate, triggering a new era of theatrical populism. It’s a straight line from Palin to the Tea Party to Donald Trump, a course that McCain inadvertently set, but from which he quickly deviated.

McCain’s last years were marked by principled opposition, first to Obama and then to Donald Trump. Neither, in his opinion, understood the threat of Russia nor the importance of US engagement in the Middle East, and when McCain took a stand against President Trump’s health care reforms and disparaged any “half-baked, spurious nationalism,” he re-emerged in the American imagination as a truly independent-minded senator.

There was, regrettably, a personal side to the McCain-Trump feud: McCain withdrew his endorsement from Trump’s 2016 campaign after the release of tapes that showed him bragging about sexual assault, and it was reported that the Senator didn’t even want the President to attend his funeral.

But McCain was not some sensitive soul who couldn’t stomach the dirt of politics. He was tough; good humored. His close friend Sen. Lindsey Graham went to see him in hospital after surgery and the two of them watched the patient’s favorite Western: “The Man Who Shot Liberty Valance.” McCain provided a running commentary that was “R-rated,” said Graham, “but it was fun.”

This plainspoken conservative wasn’t right about everything. His personal ambitions ended, ultimately, in failure. But the name McCain commands a breadth of respect that many of the men who beat him could never enjoy. Here was a man who gave everything to his country: his career, his body, his life.