WASHINGTON - John McCain, a war hero and towering figure in American politics, known for reaching across the aisle in an increasingly divided nation, died Saturday following a battle with brain cancer.
He was 81.
The senator's passing marked the end of a storied, 35-year political career that brought the independent-minded Republican within reach of the White House as his party's presidential nominee.
"It's been quite a ride," McCain, who was tortured during five years as a prisoner of war in Vietnam, wrote in a memoir published earlier this year.
"I've known great passions, seen amazing wonders, fought in a war and helped make peace. I made a small place for myself in the story of America and the history of my times."
McCain, who had been receiving treatment in his home state of Arizona, was surrounded by his wife Cindy and his family during his final hours.
"He was a great fire who burned bright, and we lived in his light and warmth," said Meghan McCain, one of the late senator's seven children - three of them from a previous marriage.
Near the driveway to his ranch in a rural part of Sedona, Arizona, a sign read "Sen McCain, thank you for your service."
A police escort accompanied the hearse that carried his body, as a fiery sunset cast its last light over the rustic countryside McCain loved dearly, and local residents came bearing flowers for the late political titan.
A steady stream of friends and colleagues had come to bid him farewell at his Arizona ranch in the months since his cancer diagnosis, in July 2017.
US President Donald Trump, who once mocked McCain's war record, said he sent his "deepest sympathies and respect."
My deepest sympathies and respect go out to the family of Senator John McCain. Our hearts and prayers are with you!— Donald J. Trump (@realDonaldTrump) August 26, 2018
McCain had been a rare and outspoken Republican critic of Trump, accusing him of "naivete," "egotism" and of sympathizing with autocrats. He made a decisive vote last year that killed Republican attempts to repeal Barack Obama's health care reforms, and Trump never forgave him.
'All in his debt'
The sharp-tongued McCain had disagreements with many fellow politicians - including inside his own camp -- but the Republican stalwart was widely recognized for his deep integrity, and condolences came swift from the highest reaches of American politics.
"We are all in his debt," said former president Obama, the Democrat to whom McCain lost the presidency in 2008.
"We shared, for all our differences, a fidelity to something higher - the ideals for which generations of Americans and immigrants alike have fought, marched and sacrificed."
Democrat Bill Clinton hailed McCain for having "frequently put partisanship aside," while his former vice president Al Gore said he always admired how the senator "would work to find common ground, no matter how hard."
"John McCain was a man of deep conviction and a patriot of the highest order," said former president George W. Bush, whom McCain sought and failed to defeat in 2000 and succeed in 2008.
On Capitol Hill, McCain became close friends with Senator Lindsey Graham and former senator Joe Lieberman - a trio dubbed the "Three Amigos."
WATCH: Zondeni Sobukwe funeral
Now that the trio is missing its driving force, Graham wrote that "America and Freedom have lost one of her greatest champions... And I've lost one of my dearest friends and mentor."
Hailing him as a "truth-teller" with "unsurpassed" dedication to the US and its military, the top Senate Democrat Chuck Schumer said he would seek to rename a Senate building in his honour.
McCain stopped receiving cancer treatment earlier this week, his family saying "the progress of disease and the inexorable advance of age render their verdict."
He had spent more than three decades in the Senate, looming large in debates over war and peace and the moral direction of the nation. Before joining the upper chamber, he served as a US representative from 1983 to 1987.
McCain had been away from the Senate floor since last December, remaining at his Arizona home for treatment of glioblastoma - the same form of brain cancer that took the life of another Senate giant, Democrat Ted Kennedy, in 2009.
Our statement on the passing of Senator John McCain: pic.twitter.com/3GBjNYxoj5— Barack Obama (@BarackObama) August 26, 2018
John McCain was many things – a proud graduate of the Naval Academy, a Senate colleague, a political opponent.— Joe Biden (@JoeBiden) August 26, 2018
But, to me, more than anything, John was a friend. He will be missed dearly. pic.twitter.com/AS8YsMLw3d
John McCain believed that every citizen has a responsibility to make something of the freedoms given by our Constitution, and from his heroic service in the Navy to his 35 years in Congress, he lived by his creed every day. https://t.co/946T7PnG53— Bill Clinton (@BillClinton) August 26, 2018