Former US presidents Barack Obama and George W Bush, once fierce rivals of the late Senator John McCain, have praised him in eulogies at a national memorial service in Washington.
They also joined his daughter in subtle and not-so-subtle rebukes of President Donald Trump.
Without naming Mr Trump, who did not attend the service, Meghan McCain made a forceful statement condemning the president in remarks that at times drew applause and came after she said her father told her to "show them how tough you are" with her eulogy.
"We gather here to mourn the passing of American greatness,the real thing, not cheap rhetoric from men who will never come near the sacrifice he gave so willingly, nor the opportunistic appropriation of those who live lives of comfort and privilege while he suffered and served," she said, speaking forcefully and, at times, through tears.
Taking aim at Mr Trump's campaign slogan, "Make America Great Again," she said McCain's America was always great.
President Trump feuded publicly with McCain and mocked his military service, continuing to knock him even after he grew ill.
The former Republican Arizona senator died on 25 August from brain cancer, days before his 82nd birthday.
Nearly every major US political leader attended the memorial service, and while President Trump himself was absent, his presence was felt.
McCain asked Mr Obama and Mr Bush to deliver eulogies while the family made clear that Mr Trump was not welcome.
Irish ballad ‘Danny Boy’ being sung at the funeral of @SenJohnMcCain. #JohnMcCain @rtenews pic.twitter.com/hVD8mmi9pJ
— Brian O'Donovan (@BrianOD_News) September 1, 2018
Mr Obama, who beat McCain in the 2008 presidential election, hailed the one-time prisoner of war for his commitment to truth and core democratic values, qualities that some critics see lacking in Mr Trump.
"So much of our politics, our public life, our public discourse can seem small and mean and petty, trafficking in bombast and insult, and phoney controversies, and manufactured outrage," Mr Obama said.
"It's a politics that pretends to be brave and tough, but in fact is born in fear. John called on us to be bigger than that. He called on us to be better than that."
Mr Bush, in his eulogy, described Mr McCain as a man with a code.
"He loved freedom with a passion of a man who knew its absence. He respected the dignity inherent in every life, a dignity that does not stop at borders and cannot be erased by dictators," he said.
"Perhaps above all, John detested the abuse of power. He could not abide bigots and swaggering despots."
We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences
McCain's body, which had lain in state at the US Capitol, arrived at the cathedral with a motorcade that first stopped at the Vietnam Veterans Memorial.
There his wife, Cindy McCain, laid a wreath to honour those who died in the war.
Members of the military slowly carried the coffin into the cathedral and back out again after the two-and-a-half-hour service.
Top members of the Trump administration, including his daughter Ivanka and son-in-law Jared Kushner, attended, as did White House chief of staff John Kelly and national security adviser John Bolton.
Other guests included former president Bill Clinton, former secretary of state Hillary Clinton, former Republican presidential nominee Mitt Romney, and former senators Bob Dole and John Kerry.

McCain was a leading voice for revamping immigration, campaign finance and environmental laws in the United States.
But it was his military service, punctuated by years as a prisoner of war in Vietnam, that moulded his political life.
Rising to the rank of captain in the US Navy, he was shot down over Hanoi while on a bombing mission in 1967.
Held as a prisoner until 1973, he was tortured by his Vietnamese captors in a jail that Americans dubbed the "Hanoi Hilton."
Tomorrow there will be a private burial service at the US Naval Academy in Annapolis, Maryland.
McCain was a member of the academy's Class of 1958.
Read more:
Brian O'Donovan: John McCain and Ireland