John McCain, the senator from Arizona, passed away from brain cancer on Saturday at the age of 81. He weathered the sharp attacks from opponents and voters that all politicians do, but his burnish of authenticity, increasingly rare in public figures, spoke to our American ideal of independence, and his early sacrifice as a prisoner of war pulled at our patriotism. McCain was who we wanted our politicians to be, even if he didn’t always live up to our own idea of who he was.

The “maverick” label he will likely be best-remembered for was a mixture of personality, PR and the truth.

McCain was born in the Panama Canal Zone in 1936 to a family that was as close to U.S. naval royalty as they come. His grandfather was a four star admiral, as was his father, who was head of U.S. Pacific Command when the future senator was captured by the North Vietnamese and held as a prisoner of war for five and a half years. It is McCain’s brutal term of imprisonment and survival that has made him an almost honorary member of the greatest generation.

His political career began in 1982 with a run for Congress in Arizona, and he would go on to serve two terms in the House. His thinking about politics started long before that, though. In a 1973 accounting of his captivity for U.S. News & World Report, McCain wrote that in prison, he “spent days on end going back over those history books in my mind, figuring out where this country or that country went wrong, what the U. S. should do in the area of foreign affairs.”

In 1986, when conservative legend Sen. Barry Goldwater of Arizona decided to retire, McCain ran for his seat and won. His place in the Senate and American political life would become prominent over the next 32 years. The “maverick” brand affixed to him during his 2000 primary run for the presidency — McCain’s campaign against George W. Bush, the son of a president, was called an “outsider” bid. But McCain was in many ways a mainstream Republican for many years, maverick label aside.

During McCain’s early Senate career, he was a relatively between-the-lines Republican in his voting record. But starting around his first run for president in 2000, McCain’s independent streak began to show just as party-line voting became more and more the default:

He voted against the Bush tax cuts and for reducing greenhouse emissions, and he spoke out against the use of torture by the U.S. post-9/11. While he was a vocal proponent of the Iraq War, his stance against torture was deeply personal; one former campaign aide recently recalled that before speeches, McCain would have to lean over so that someone else could brush his hair. His arms had been injured during his capture and imprisonment, and he couldn’t raise them above his shoulder. His marquee issues in the Senate would become campaign finance reform, which he pursued with Democrat Russ Feingold, and immigration reform (his public tenor on the issue of immigration would change depending on whether it was a re-election year, but throughout McCain’s Senate career, he pursued various compromise deals on the issue.)

McCain’s reputation for breaking with his party was made more stark by his contemporaries’ increasing unwillingness to do so. McCain never wavered too much in how often he broke ranks with the GOP, but over the course of his Senate career, his colleagues became much more partisan in how they voted:

It was also McCain’s off-the-cuff nature that earned him his reputation as a freewheeling Western individualist. Journalists loved covering his 2000 run from his “Straight Talk Express” bus, since the candidate actually let them ride with him and talk. You can even find an old “Daily Show” clip of McCain and his wife, Cindy, gamely playing along with a young Steve Carell’s bit. Last year, a couple of weeks after his cancer diagnosis, McCain sentimentally tweeted out old photos of him with journalists from the 2000 campaign. When there was talk of banning hallway interviews in the Senate, McCain voiced his dissent: “It wouldn’t be the same.”

McCain’s desire to prove his autonomy from the conventional wisdom and structures of politics could also prove puzzling. His selection of Sarah Palin to be his vice presidential candidate during the 2008 presidential campaign was meant to infuse a faltering campaign with new energy, but his hasty selection of the then-governor of Alaska would prove an embarrassment to the campaign, given Palin’s apparent lack of awareness on issues. “Someone was nominated to the vice presidency who was manifestly unprepared to take the oath of office should it become necessary and as it has become necessary many times in American history,” McCain’s chief strategist later said.

McCain came mostly back into the GOP fold policy-wise during that 2008 presidential run and in the early Obama years. You can see that in the first chart above, which shows how often McCain voted with Republicans on party-line votes, and you can see it in how often McCain’s votes differed from the conservative position according to the American Conservative Union scorecard:

But the Trump era saw a rebirth of McCain’s pugnaciousness. The president and the senator have been public foes since the earliest stages of the 2016 presidential campaign. In Ames, Iowa, then-candidate Trump said this to a crowd, “He’s not a war hero. He was a war hero because he was captured. I like people who weren’t captured.” McCain’s posture toward the president has remained defiant. McCain wouldn’t say whether he voted for Trump, and Cindy McCain was photographed wearing a white pants suit to cast her presidential vote, a visual allusion to the symbolic suffragette white outfit that Hillary Clinton wore to accept the Democratic nomination. During Trump’s first week in office, McCain and Sen. Lindsey Graham issued a statement condemning the president’s travel ban as ill-conceived and inconsistent with American values. But perhaps the most damning blow that McCain struck against the president was his dramatic late-night vote that killed the Republican Congress’s chance to repeal Obamacare.

He is survived by his wife and seven children.