John McCain was remembered on Saturday as an “American original”, a “maverick” and a “hero of the Republic” who served his country for six decades in uniform and in Congress.
The death of the Arizona senator, aged 81 and after more than a year-long battle with brain cancer, was met with an outpouring of condolences and tributes from dignitaries and politicians around the world as flags at the US Capitol and White House were lowered to half-staff in his honor.
In a statement, Barack Obama honored his 2008 rival for the White House. Despite their political differences, he said, they shared a “fidelity to something higher – the ideals for which generations of Americans and immigrants alike have fought, marched, and sacrificed”.
Obama continued: “We saw our political battles, even, as a privilege, something noble, an opportunity to serve as stewards of those high ideals at home, and to advance them around the world. We saw this country as a place where anything is possible – and citizenship as our patriotic obligation to ensure it forever remains that way.”
McCain died surrounded by family at his ranch near Sedona, Arizona, a statement from his Senate office said. He was diagnosed with glioblastoma last July and his family announced on Friday that he would discontinue medical treatment.
“My heart is broken,” his wife, Cindy McCain, wrote on Twitter. “I am so lucky to have lived the adventure of loving this incredible man for 38 years. He passed the way he lived, on his own terms, surrounded by the people he loved, in the the place he loved best.”
Meghan McCain, a co-host of ABC’s The View and one of the senator’s seven children from two marriages, said: “He taught me how to live. All that I am is thanks to him. Now that he is gone, the task of my lifetime is to live up to his example, his explanations, and his love.”
She added: “He was a great fire who burned bright, and we lived in his light and warmth for so very long.”
In a tweet, Donald Trump offered his “deepest sympathies and respects” to McCain’s family.
The relationship between the two Republican leaders was fraught. Despite the senator’s illness, Trump, who famously questioned McCain’s heroism in Vietnam, continued to criticize McCain for a 2017 vote against a plan to repeal key portions of the Affordable Care Act.
Under Trump’s presidency, McCain watched his party veer from the values he championed. He disagreed sharply with Trump on foreign policy and America’s role in the world.
Former President George W Bush, once a rival for the White House, called McCain a “man of deep conviction” and a “public servant in the finest traditions of our country”.
Bush beat McCain in a fierce Republican primary in 2000. The former president supported McCain’s 2008 run but his unpopularity and the shadow of the Iraq war were widely believed to have hampered the senator’s chances.
McCain’s choice of the Alaska governor Sarah Palin as his running mate had lasting effects. Debate continues over whether he thereby unleashed the populist, hard-right wing that now dominates the Republican party.
On Saturday, Palin called McCain “an American original” and “a maverick and a fighter, never afraid to stand for his beliefs”.
“John McCain was my friend,” she said. “I will remember the good times.”
Obama’s vice-president, Joe Biden, also called McCain a friend, saying his life was “proof that some truths are timeless”. He added: “America will miss John McCain. The world will miss John McCain. And I will miss him dearly.”
Hillary Clinton, who lost the 2016 election to Palin’s heir, said McCain was “a tough politician, a trusted colleague, and there will simply never be another like him”.
Former president Bill Clinton saluted McCain for his belief “that every citizen has a responsibility to make something of the freedoms given by our Constitution”.
“He lived by his creed every day,” Clinton said, thanking McCain for his role in normalising relations with Vietnam.
Former president Jimmy Carter praised McCain’s “steadfast integrity”.
House Speaker Paul Ryan honored McCain as someone who put “principle before politics” and “country before self”. The House Democratic leader Nancy Pelosi said the nation lost a “leader and public servant of deep patriotism, outstanding bravery and undaunted spirit”.
Senator Lindsey Graham, a Republican of South Carolina, said he would need time to absorb the loss of one of his “dearest friends and mentor”.
“America and Freedom have lost one of her greatest champions,” he wrote on Twitter.
Senator Chris Murphy, a Democrat of Connecticut, recalled on one occasion listening to McCain tell members of the Senate the story of his capture and imprisonment in Vietnam.
He told them that the prisoners developed a system of “tapping out letters on the cell walls” to communicate with each other because they would be beaten if they spoke aloud. Senator Dianne Feinstein asked McCain if he could still remember the code.
He began to tap on the podium. Then he leaned into the microphone and said softly: “I just tapped out ‘yes, [Dianne], I still can.”
Senator Ben Sasse, a Republican of Nebraska, said he once asked McCain how long it took to learn that code. McCain, who was known in the halls of the Senate for his wit, replied: “Who cares?! What the hell else were we going to do? We had infinite time.”
Mitch McConnell of Kentucky, the Republican Senate majority leader who sparred with McCain on occasion, remembered a “bright example” in what he called a political era “filled with cynicism”.
“It’s an understatement to say the Senate will not be the same without our friend John,” McConnell added. “The nation mourns the loss of a great American patriot, a statesman who put his country first and enriched this institution through many years of service.”
The Senate Democratic leader, Chuck Schumer, said McCain was a “truth teller – never afraid to speak truth to power in an era where that has become all too rare”.
Schumer said he planned to introduce a resolution to rename the Russell Senate office building after McCain.
“Now, in a way that would probably have him making wisecracks, we are wistful for John McCain,” Arizona senator Jeff Flake wrote in an op-ed for the Washington Post. “We may never see his like again, but it is his reflection of America that we need now more than ever.”
Support for this article was provided by theguardian