Senator John McCain: Who is the Republican elder statesman?
A war hero, a political maverick, and one of President Trump's fiercest Republican critics - Senator John McCain, 81, has been granted all these titles over the years.
Known in Washington for his doggedness and common-sense conservatism, he beat off younger rivals to secure the Republican party's nomination for president in 2008.
As a US Navy pilot, Mr McCain narrowly escaped death in July 1967 when a missile exploded near his fuel tanks, sparking a ship fire that left 134 troops dead.
Three months later he was shot down over Vietnam, where he spent five years as a prisoner of war.
The son of a four-star admiral, he was offered early release due to his father's prominence - but rejected it. Instead, he endured repeated beatings and torture, including two years in solitary confinement.
The six-term senator now faces another grave battle, after being diagnosed with brain cancer.
Mr McCain had surgery to remove a blood clot from near his left eye on 14 July, and was found to have an aggressive form of brain tumour known as glioblastoma.
Well-wishes from across the political divide saw four former presidents praise his tenacity, with President Trump sending his "thoughts and prayers", and Barack Obama - his rival for the presidency in 2008 - commenting, "John McCain is an American hero... Cancer doesn't know what it's up against."
Mr McCain stayed in the armed forces after his return to the US, ultimately acting as naval liaison to the Senate until his retirement in 1981.
It was at this point that he moved to Arizona to embark on a political career, winning a congressional seat in 1982 and securing a Senate seat four years later.
Running against George W Bush for the 2000 presidential nomination, Mr McCain's direct style won him initial support and he secured a surprise victory in the New Hampshire primary.
But he was hit by a number of attacks as campaigning turned increasingly negative, and later fell out with influential members of the so-called "religious right".
The choice of Christian conservative Sarah Palin as running mate for his 2008 presidential campaign was designed to win over such Republicans.
Mr McCain has never been afraid to adopt a controversial position - especially since Donald Trump's emergence in politics.
Though he has since hardened some of his views, he has previously attracted the ire of social conservatives for his relatively moderate views on civil unions, abortion and immigration reform.
He was one of the Iraq war's strongest supporters, and backed the troop increase there known as the "surge".
As chairman of the Senate Armed Services Committee he has been a vocal - and hawkish - force in foreign policy and military affairs.
While battling Mr Obama for the White House, Mr McCain stressed his own experience in these areas and argued that he would make a far better commander-in-chief.
Concerned by Trump
The Arizona Senator has repeatedly criticised President Trump's warming relations with Russia, and spent New Year's Eve 2016 with Ukrainian Marines.
"We stand w/them in their fight against #Putin's aggression," he tweeted then.
Mr McCain withdrew his support for Mr Trump - then his party's presidential nominee - in October 2016, the day after a 2005 recording emerged of him making obscene remarks about women and appearing to trivialise sexual assault.
"When Mr Trump attacks women and demeans the women in our nation and in our society, that is a point where I just have to part company," he said.
- McCain condemns Trump in Khan row
- LISTEN: McCain - 'People are giving up on the West'
- Republican healthcare efforts collapse
In July 2017, he told CBS's Face the Nation that Russian President Vladimir Putin "got away with" trying to change the result of the 2016 US presidential election.
Working with Democrats
The Republican elder has repeatedly shown himself willing to work with Democrats or vote against his party on ideological grounds, including when he voted to reduce greenhouse gas emissions, and against George W Bush's tax cuts.
He co-sponsored a bipartisan immigration bill in 2007 which, had it passed, would have offered an amnesty to illegal immigrants as well as tougher border controls.
And he was the author, with Democrat Senator Russ Feingold, of a major campaign finance reform in 2002 intended to reduce the influence of money and pressure groups in US elections.
He has criticised President Trump's refugee travel ban, saying it betrays American values and "in some areas, will give Isis [Islamic State] some more propaganda".
When news broke of the president's confrontational first phone call with Australia's Prime Minister Malcolm Turnbull, Mr McCain phoned Australia's US ambassador, Joe Hockey, to express "unwavering support" for the countries' relationship.
In 2017, Mr McCain travelled to war-torn Syria to visit US forces deployed there.
He called the Trump administration's decision not to prioritise ending the Syrian civil war "another disgraceful chapter in American history".
As reports emerged of his cancer diagnosis in summer 2017, the senator's office said he was "in good spirits as he continues to recover at home with his family".
But news a year later that he had discontinued medical treatment suggested the old granite-faced warrior had lost his last battle, and left the political world in mourning.