The passing of Sen. John McCain marks the end of an era in American political life. He was a genuine centrist who exemplified that tradition at both its best and its worst. His death gives us occasion to take stock of all we're likely to lose when the establishment of which he was a leading member is thoroughly overthrown, while also noting how its distinctive weaknesses have contributed to its precipitous decline in our public life.

Americans are always hungry for heroes, and McCain served admirably in that role for many years. His service, sacrifice, and suffering as a prisoner of war during the Vietnam War was genuinely awe-inspiring and worthy of profound veneration and respect.

In his dignified bearing, civility, and respectful bipartisanship, McCain displayed the classical virtues like few in our time. Honor, nobility, courage, public-spiritedness — he esteemed them all and did his best to embody them in his life. That, far more than his policy positions or well-known chumminess with reporters, is the source of the heartfelt tributes that have flowed forth from so many at the news of his death. His life was a reminder of an older, elevated notion of politics that places country before party and self-sacrifice before self-interest. That such displays of public virtue can still move so many, even at such an otherwise tawdry time in our history, is powerful evidence that they grow out of and touch something deep and ineradicable within the human soul.

McCain's effort to stake out positions that aimed for something like a common good led him to work on bipartisan legislation with such Democrats as Russ Feingold and Ted Kennedy. It also provoked him to swipe at those in his own party he considered to be "agents of intolerance" and to take stands against Republican voters who displayed small-minded bigotry. He did both knowing full well that such acts could harm him politically. At a time when many on the right deny the possibility of standing on principle, McCain made a habit of doing exactly that.

But he didn't do it enough. In one of his weakest moments, he helped to empower the very forces in our politics that aim to do away with everything McCain stood for. In picking Sarah Palin to be his running mate in the 2008 presidential election (in part to please the elements of the GOP base he'd previously antagonized), McCain elevated right-wing populism far beyond anything the U.S. had previously seen. Republican voters heard on a national stage a candidate who knew nothing about the issues and offered little beyond empty expressions of cultural resentment. And they loved it. In compromising his high-minded principles for the sake of expediency, McCain inadvertently paved the way for the debasement of American politics.

This decision was encouraged by members of the political establishment on the center-right — Bill Kristol, Ross Douthat, and others. They made the case for choosing a candidate who would bolster McCain's populist bona fides. It was a variation on a strategy that neoconservatives and others on the right had been advocating for years: encouraging right-wing populism on the assumption that Republicans could use it to gain high office, where they would govern responsibly, with non-populist advisers running the show and setting the agenda. But what if the populists rejected this arrangement and began demanding to be put in the driver's seat? After Palin, the Republican establishment certainly found out.

Given his decisive role in promoting Palin's trash-talking form of rabblerousing, one might have expected a man of McCain's decency and thoughtfulness to recognize the danger posed by Donald Trump early on and do everything in his power to deny him the party's nomination. Instead, McCain followed the rest of the Republican leadership in prevaricating until it was far too late. The result was a rare profile in cowardice for the senior senator from Arizona. McCain's later public stands against Trump and the moral breakdown of the GOP, taken after his cancer diagnosis, were a partial return to form. But in most cases, they came long after they could do much good.

But perhaps even more than his elevation of Palin, McCain's stances on foreign policy helped pave the way for the electoral collapse of the country's once vital center. McCain was a hawk for all seasons, consistently pushing the form of full-spectrum idealistic militarism that came to be associated with neoconservativism. Whatever the geopolitical problem, McCain was there (usually in the form of an op-ed co-authored with latter-day Trump toady Lindsey Graham) to place his moral authority and reputation behind a proposal to launch a barrage of bombs, and sometimes send ground troops as part of an invasion designed to overthrow tyrannical governments, in the name of freedom and democracy.

The most notorious example, of course, was the invasion and occupation of Iraq. Like most members of both parties' establishments, McCain strongly supported former President George W. Bush's decision to overthrow the government of Saddam Hussein without giving a concrete thought as to what would replace it. The United States — especially the members of armed forces that McCain revered so highly — and the entire Middle East have amply suffered the consequences of this recklessness.

McCain's long overdue mea culpa on Iraq, contained within the final book he published before his death, was certainly welcome. But there was no sign in it of a broader rethinking — no evidence that he'd abandoned his reflexive bellicosity in favor of a stance more realistic and restrained. Iraq may have been a mistake. But, he implied, it was just a one-off error. Elsewhere — Libya, Syria, Iran, North Korea, China, Russia — the same old bluster was all he had to offer.

As the old saying has it: Fool me once, shame on you; fool me twice, shame on me. America's political (and foreign policy) establishment has made an awful lot of foolish mistakes and earned an awful lot of shame since the conclusion of the Cold War. And John McCain was a leading member of that establishment, far too often backing up and encouraging its follies.

Any attempt to reach an honest and sober assessment of his career and contribution to our politics must wrestle with this decidedly mixed track record and its far-reaching unhappy consequences.