John McCain, the U.S. senator whose determination lifted him from the torture suffered as a Vietnam prisoner of war to the heights of Capitol Hill and the brink of the White House, has died at age 81.

McCain had been diagnosed with a brain tumour in July 2017 after surgery to remove a blood clot above his eye. Doctors at the Mayo Clinic in Phoenix said he had glioblastoma, an aggressive form of cancer.

Two months later, McCain’s announcement that he would not support a bill to repeal and replace the Affordable Care Act put a halt to Republican efforts to end Obamacare.

On Friday, his family announced he would stop seeking cancer treatment. He died on Saturday.

An Arizona senator since 1987, McCain gained a reputation as a political maverick, frequently co-signing bipartisan legislation and breaking from many in his Republican Party on issues of military engagement, treatment of war prisoners, climate change, campaign finance and a path to citizenship for illegal immigrants.

He was one of the most press-friendly modern politicians in Washington, winning over reporters with self-deprecation and what the late David Foster Wallace called McCain’s “piss-and-vinegar candour.”

“I am older than dirt and have more scars than Frankenstein,” McCain would say in his 2008 bid to become, at 72, the country’s oldest president at inauguration.

U.S. Senator John McCain, recently diagnosed with brain cancer, calls for both parties to look past differences to get things done for the people 0:49

McCain would secure the Republican nomination and win 22 states on election night, but Barack Obama won the popular vote and 365 electoral votes to McCain’s 173.

More recently, McCain often clashed with President Donald Trump.

Trump famously derided McCain in mid-2015: “He’s a war hero because he was captured. I like people who weren’t captured.”

A month before the 2016 election, McCain announced he wouldn’t vote for Trump after the candidate’s lewd remarks prior to a 2005 television appearance came to light.

In speeches in 2017, it was clear who McCain was referring to when he expressed alarm over the “growing unwillingness to separate truth from lies” and the rise of “half-baked, spurious nationalism cooked up by people who would rather find scapegoats than solve problems.”

In July 2018, he criticized Trump’s joint news conference with Russian President Vladimir Putin as “one of the most disgraceful performances by an American president in memory.”

Shot down over Hanoi

As a navy pilot, McCain was flying a Skyhawk bomber over Hanoi on his 23rd mission during the Vietnam War on Oct. 26, 1967, when he was shot down by a missile. He ejected from the plane, plunging into Truc Bach Lake with broken arms and a broken right leg, using his teeth to deploy his life-vest.

He was eventually taken to a prisoner camp, where at least two fellow PoWs believed him to be near death. It was McCain’s second brush with death in weeks; he had been aboard the USS Forrestal in the Gulf of Tonkin in July when a massive fire and related explosions killed 134 people.

The North Vietnamese discovered they had a propaganda “prize” on their hands.

McCain greets U.S. President Richard Nixon at a pre-POW dinner reception in Washington in May 1973. (National Archives/Handout via Reuters)

He was the third John Sidney McCain, born Aug. 29, 1936, at an airbase hospital near the Panama Canal, the grandson of a Second World War navy admiral and the son of a navy admiral about to take over the Pacific command for the U.S. in the Vietnam War.

McCain was soon given the opportunity to return home but instead maintained the PoW code of conduct that held the earliest captured must be the first to leave.

After he refused amnesty a final time, he recounted, his interrogator said: “Now, McCain, it will be very bad for you.”

Torture and solitary confinement

McCain was subjected to regular beatings, bound and hung by ropes, racked by dysentery and confined to solitary for two years. To his everlasting regret, amid frequent beatings, he signed an anti-American confession.

“I had learned what we all learned over there: every man has his breaking point. I had reached mine,” he said of his confession in a first-person account published in the U.S. News & World Report in 1973.

McCain spent time in the notorious “Hanoi Hilton” prison and detailed in 1999’s Faith of My Fathers how he and other prisoners maintained their sanity, by tapping on walls to communicate, and with gallows humour and silly diversions, like naming parts of the prison camp after Vegas casinos. When alone, McCain prayed and re-enacted plays and movies.

He was released on March 14, 1973, and soon rejoined his three children and wife, Carol.

Political beginnings

McCain described himself at the beginning of his naval career as an “arrogant, insolent midshipman,” and he graduated 894th out of 899 in his class at Annapolis, Md., in 1958.

But upon his return from Vietnam, he studied at the National War College in D.C. and then served as a navy liaison to the U.S. Senate.

McCain’s marriage dissolved in the 1970s. He attributed its demise to his “selfishness and immaturity” rather than the trauma of Vietnam, in his 2002 book Worth the Fighting For.

McCain is seen in Phoenix in November 1982. He was elected to the U.S. House of Representatives from Arizona in that year, the launch of his political career. (Tom Tingle/Phoenix Gazette via AP)

He remarried in 1980. Cindy Hensley was nearly 19 years his junior and the daughter of a wealthy beer distribution magnate. They settled in her native Arizona and had four children.

Elected to U.S. Congress in 1982, four years later, he gained the Senate seat vacated by Barry Goldwater.

McCain gained a reputation as a politician on the rise, but was later embroiled as one of the Keating Five — politicians accused of improperly intervening with federal regulators on behalf of banking executive Charles Keating, who had contributed to their campaigns.

McCain would eventually be cleared of the most serious charges by a Senate committee but was criticized for “poor judgment.”

‘Straight Talk Express’

It was a bitter, formative event, and along with a first bout with carcinoma in 1993, he pledged to be more forthright and accessible, encapsulated by the “Straight Talk Express” bus of his 2000 presidential campaign.

The writer Foster Wallace, covering that campaign, explained his appeal: “Who wouldn’t fall all over themselves for a top politician who actually seemed to talk to you like you were a person, an intelligent adult worthy of respect?”

Republican presidential candidates McCain and Texas Gov. George W. Bush, far right, debate as moderator Larry King, second from right, looks on during a televised Republican presidential debate. (Reuters)

McCain gave the campaign of heavy favourite George W. Bush a scare by scoring a resounding New Hampshire primary win, but the campaign turned nasty in South Carolina. Emails and pamphlets circulated shaming Cindy McCain for a past battle with prescription drug use, and accusing the senator of having fathered a child out of wedlock with a black woman.

It was likely a reference to Bridget McCain, a child the McCains had largely kept from the public spotlight after adopting her a decade earlier from Bangladesh. McCain lost in South Carolina, and soon bowed out as Bush’s last remaining Republican challenger.

Iraq war supporter

After the Sept. 11 attacks, McCain backed the Iraq invasion, equating Saddam Hussein to Adolf Hitler. But he publicly criticized the Bush administration’s approach to Iraq’s reconstruction and grilled Defence Secretary Donald Rumsfeld after it was found that guards had degraded prisoners at Abu Ghraib.

In his book Restless Wave, released in May 2018, McCain defended the decision to forcefully end Hussein’s regime but admitted the justification the U.S put forth ahead of the war regarding Iraqi weapons of mass destruction “was wrong.”

“The war, with its cost in lives and treasure and security, can’t be judged as anything other than a mistake, a very serious one, and I have to accept my share of the blame for it,” he said.

A military veteran pays his respects at the entrance to the McCain ranch complex in Cornville, Ariz., on Saturday. (Ross D. Franklin/Associated Press)

In 2004, McCain took a meeting when Democratic presidential candidate and fellow Vietnam vet John Kerry was looking for running mates. McCain would later joke about the appeal of the vice-presidential job compared to spending time in a North Vietnamese prison camp.

Two years later, McCain would begin a concerted effort to no longer be the favourite Republican of Democrats, making amends with the most conservative faction of his party in preparation for another presidential bid. The man who once derided Christian evangelists as “agents of intolerance,” gave the commencement speech at Jerry Falwell’s Liberty University in 2006, to the shock of then Daily Show host Jon Stewart.

“Are you going into crazy [Republican] base world?” Stewart asked.

“I’m afraid so,” McCain responded, smiling.

Sarah Palin picked as running mate

McCain was a strong 2008 candidate, despite another bout of cancer since his previous run. But he was forced to cut costs and reorganize staff after a disastrous, spendthrift first few months of the campaign.

He put all his stakes into the New Hampshire contest, and the gamble paid off. McCain was resurgent, and, helped by strategic mistakes by rivals, secured the nomination.

On paper, a contest against the first black presidential nominee, who had just four years of D.C. experience, appeared winnable.

Seeking to appeal to conservatives and women disappointed that Hillary Clinton wasn’t the Democratic nominee, McCain shocked the world by selecting as a running mate Alaska Gov. Sarah Palin. He had only met Palin once previously, and the vetting of her candidacy was hardly intensive, according to the 2008 campaign recap Game Change.

Palin’s lack of a national profile caused a media sensation, and while the vice-presidential candidate upended the campaign with her self-confidence and tenacity, she had a tenuous grasp of many pressing issues.

Back to the Senate

McCain earned praise for defending Obama as a “decent family man, citizen who I just happen to have disagreements with” when a woman at one of his rallies cast xenophobic aspersions on the Democrat.

“For John in the middle of that [campaign] to say, ‘Hold on a second, we don’t demonize each other, we’re all Americans, we’re on the same team,’ I thought was an indication of who John fundamentally was,” Obama said in the HBO documentary John McCain: For Whom the Bell Tolls.

After losing to Obama, McCain returned to the Senate. A Vanity Fair article would soon ask, “What happened to the other John McCain?” as his positions less frequently departed from those of conservative Republicans.

Critics noted his positions on abortion, same-sex marriage and gun control were largely in the mainstream of his party. Palin would vouch for McCain again during a 2010 Senate campaign, and around that time McCain told Newsweek he had never considered himself a maverick.

An opponent for his Arizona seat that year said: “It’s really sad to see John McCain, who should be revered as a statesman, basically reduced to a political shapeshifter.”

While opinions were divided on his political career, there was an outpouring of sympathy and respect from across the political spectrum for McCain when his brain cancer diagnosis was announced in July 2017, including from past presidents Obama, Bill Clinton and George H.W. Bush.

Having returned to Arizona in December 2017, he never again set foot on the Senate floor.