His death drew thousands to the United States Capitol to say one final farewell to a man whose commitment to decency seemed of a bygone era.

Key points: Mr Trump was absent from the service, Senator McCain's family made clear he was not invited

Mr Trump was absent from the service, Senator McCain's family made clear he was not invited Mr Obama and Mr Bush led service at Senator McCain's request, juxtaposed his legacy with present administration

Mr Obama and Mr Bush led service at Senator McCain's request, juxtaposed his legacy with present administration The memorial service is part of a five-day cross-country funeral procession that Senator McCain planned before dying

While senator John McCain did not make it to the highest office, he commanded a service fit for a president at the Washington National Cathedral on Saturday.

The 81-year-old died last week of brain cancer — the navy veteran had been an ever-present figure in American political life, spending 35 years as an Arizona senator.

Almost every major US political leader — both Republicans and Democrats — attended his funeral, but Senator McCain's family had made it clear that President Donald Trump was not invited.

Former presidents George W Bush and Barack Obama — the men who thwarted Senator McCain's bid for the presidency — praised his candour, fierce temper and sense of humour.

Speakers have celebrated Senator McCain's legacy against "current personal attack politics". ( AP: Palo Monsivais )

Mourners may have expected Mr Bush's and Mr Obama's poignancy, but it was Senator McCain's daughter's spirited tribute to her father that drew the loudest applause during the service.

Television host Meghan McCain said her father had urged her to "show them how tough you are" during her eulogy.

Never mentioning Mr Trump directly, and at times breaking down while she spoke, Ms McCain said her father was "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.

"The America of John McCain has no need to be made great again because America was always great."

Senator McCain's time as a prisoner-of-war in Vietnam had been mocked in 2015 by Mr Trump, who said "I like people who weren't captured".

Senator McCain had later derided Mr Trump for supporting "half-baked" policies and "spurious nationalism".

Mr Trump spent the day tweeting criticism of Canada's approach to trade deals and the Department of Justice, and played golf in Virginia.

Mr Obama said Senator McCain understood that some principles transcend politics. ( AP: Martinez Monsivais )

Former rivals deliver eulogies

Mr Obama successfully ran against the former prisoner of war during the 2008 presidential election, but said he and Senator McCain became firm friends who respected one another.

"So much of our politics, our public life, our public discourse, can seem small and mean and petty, trafficking in bombast and insult, in phony controversies and manufactured outrage," Mr Obama said.

Senator McCain, the former president said, had displayed his "mischievous streak" to the end, asking two former rivals to deliver eulogies.

"After all what better way to get the last laugh than make George and I say nice things about him to a national audience?" Mr Obama said.

"And most of all, it showed a largeness of spirit."

Mr Bush, who defeated Senator McCain during the Republican primary in 2000, said their "rivalry melted away" in later years.

"John was above all a man with a code," he said.

"He lived by a set of public virtues that brought strength and purpose to his life and to his country.

"John's voice will always come as a whisper over our shoulder, we are better than this. America is better than this."

Mr Bush recalled Senator McCain as a "carrier of human aspirations". ( AP: Pablo Monsivais )

Senator McCain's body, which had been lying in state at the US Capitol, arrived at the cathedral in a motorcade with his wife Cindy McCain and seven children.

He will be buried at the Navy Academy at Annapolis in Maryland.