Former presidents Barack Obama and George W Bush have paid tribute to senator John McCain at a memorial service at Washington's National Cathedral.
The Vietnam War hero, who became one of America's most high-profile politicians, died a week ago from brain cancer at the age of 81.
His daughter Meghan was the first to speak, paying an emotional tribute to her father while also criticising President Donald Trump's agenda.
Mr Trump did not attend the service.
The two Republicans had major differences, both personal and political, and Mr McCain's family made it clear that Mr Trump was not welcome.
Members of the Trump administration who were present included the president's daughter Ivanka and son-in-law Jared Kushner.
Following memorial services in the state of Arizona - which Mr McCain represented as a senator, and where he died last Saturday - and in Washington, a private burial service will be held at the US Naval Academy in Annapolis, Maryland, on Sunday.
On Friday Mr McCain's body was taken back to the Congress buildings where he worked for decades and lay in state in the Capitol rotunda overnight.
On the way from the Capitol to the cathedral on Saturday morning, the cortege stopped at the Vietnam Veterans Memorial, where his widow Cindy laid a wreath.
'The real thing'
Meghan McCain told mourners at the cathedral: "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.
"The America of John McCain is generous and welcoming and bold, she is resourceful and confident and secure, she meets her responsibilities, she speaks quietly because she is strong.
"America does not boast, because she does not need to. The America of John McCain has no need to be made great again, because America was always great."
Former president Obama paid tribute to the man he defeated in the 2008 US presidential election.
He described Mr McCain as an "extraordinary man - a warrior, a statesman, a patriot" who embodied much of what made America great.
Mr Obama said that, despite their many differences "we never doubted we were on the same team".
Mr Bush - who defeated Mr McCain for the Republican presidential nomination in 2000 - paid tribute to the senator's courage, honesty and sense of honour.
"At various points during his long career, John confronted policies and practices that he believed were unworthy of his country.
"John would be the first to tell you he was not a perfect man, but he dedicated his life to national ideals that are as perfect as men and women have as yet conceived."
Other speakers included former Senator Joe Lieberman and former secretary of state Henry Kissinger, 95.
Before he went into politics, Mr McCain was a US Navy pilot who was shot down over Hanoi while on a bombing mission in 1967.
He was held as a prisoner until 1973, enduring torture that - along with the injuries he sustained bailing out of his jet - left him with life-long injuries.
While deeply conservative on some issues, the Arizona senator had a maverick streak that endeared him to political friends and opponents.
He championed reform of US immigration, campaign finance and environmental laws, and was outspoken in criticising those who advocated what he considered torture against captured enemies of the US.
The pallbearers he chose reflected his desire to reach across political divides.
They included Hollywood actor and liberal political activist Warren Beatty; former independent New York mayor Michael Bloomberg; liberal former senator Russ Feingold, who drew up campaign finance reform legislation with McCain; and Russian opposition politician Vladimir Kara Murza.