JOHN McCain’s daughter and two former presidents led a public rebuke of US President Donald Trump’s divisive politics at the late senator’s memorial service in a call for a return to civility among the nation’s leaders.

The nearly three-hour service at the Washington National Cathedral was a remarkable show of defiance against a president McCain openly defied in life as the antithesis of the American spirit of service to something greater than any individual

The eulogies were read by Barack Obama and George W. Bush, who had each stymied Mr McCain’s presidential aspirations – in the 2008 election and 2000 Republican primaries respectively – at his request.

Mr Obama described being asked to eulogise his former opponent as “a precious and singular honour”, but confessed he was surprised to be asked earlier this year to do so by McCain.

“I’ll admit sadness but also a certain surprise but after our conversation,” which he said reflected McCain’s “irreverence, sense of humour, and little bit of a mischievous streak”.

“After all, what better way to have the last laugh than to make George and I say nice things about him to a national audience,” Mr Obama said to laughter from the attendees.

Mr Obama spoke of McCain as understanding that America’s security and influence came not from “our ability to bend others to our will” but universal values of rule of law and human rights.

“So much of our politics, our public life, our public discourse can seem small and mean and petty, tracking in bombast and insult and phony controversies and manufactured outrage,” Mr Obama said in another not-so-veiled nod to Mr Trump.

“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.”

John McCain’s daughter opened his memorial service by posing her father’s legacy as a direct challenge to US President Donald Trump.

Meghan McCain said her father was a “great man” and she encouraged others to live up to his example during the service at the Washington National 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 lived lives of comfort and privilege while he suffered and served,” she said.

She said to applause, “The America of John McCain has no need to be made great again because America was always great.” Trump is not on hand for the ceremony, after McCain’s family made clear he was not invited.

The American war hero and towering Republican leader was remembered as “one of the bravest souls our nation has ever produced”.

Mr Bush told of becoming friends with his former White House rival as the two would recall their political battles like former football players remembering the big game.

But mostly Mr Bush recalled a champion for the “forgotten people” at home and abroad whose legacy will serve as a reminder, even in times of doubt, in the power of America as more than a physical place but a “carrier of human aspirations.”

“John’s voice will always come as a whisper over our shoulder - we are better than this, America is better than this,” Mr Bush said.

Meghan McCain described her father as “a great fire who burned bright”. “A few have resented that fire … but my father never cared what they thought.

“And they have the opportunity, as long as they draw breath, to live up to the example of John McCain,” she said.

Mr Trump, who was not invited to the services and has not served in armed conflict, had controversially mocked McCain during the 2016 election campaign for being captured by the Vietcong.

During McCain’s funeral Mr Trump was tweeting threats at Canada over a new NAFTA trade deal and then went and played golf.

“My father had every reason to think the world was an awful place, my father had every reason to think the world was not worth fighting for, my father had every reason to think the world was worth leaving,” Meghan McCain said, alluding to his favourite book, For Whom the Bell Tolls.

“He did not think any of those things. Like the hero of his favourite book John McCain took the opposite view. You had to have had a lot of luck to have such a good life.”

Cindy McCain, who has remained stoic at her husband’s services this week, fell into the arms of her son, Jack, as Renee Fleming sung Danny Boy, the Senator’s favourite song.

Ivanka Trump and her husband Jared Kushner were among those inside the cathedral for the funeral.

The bipartisan turnout included Bill and Hillary Clinton, the Obamas, senior members of the Trump administration, and many of the current Democrat leadership.

The Obamas sat next to the Bushes. One moment that was captured by social media users was when George W. Bush passed along a piece of candy from his wife, Laura Bush, to Michelle Obama.

Heavy crowds lined overcast Washington streets as a motorcade took McCain’s coffin past the Vietnam Veterans Memorial, where his widow Cindy McCain laid a wreath about 9am local time (11pm AEST).

She was joined by members of her family, Defence Secretary Jim Mattis and White House Chief of Staff John Kelly.

It was the first event in a day planned by Mr MrCain, a proud veteran of the Vietnam conflict who was held captive for five and a half years during the war, and came ahead of his funeral at the National Cathedral.

Hollywood stars and senior Washington figures have joined Mr McCain’s family to offer their respects, where his body lay in state in the US Capitol.

Five days of memorials began on Wednesday in McCain’s hometown of Phoenix, Arizona and his coffin travelled to Washington for a public viewing on Friday ahead of this morning’s service.