Washington: John McCain's daughter opened his memorial service by posing her father's legacy as a direct challenge to President Donald Trump, setting a tone that echoed the senator's own fighting spirit as former Presidents Barack Obama and George W Bush eulogised him Saturday at the Washington National Cathedral.

Bush and Obama, both challenged by McCain in their bids for the White House, drew on the senator's legacy at home and abroad to talk of the nation's values in remarks that at times seemed a clear rebuke of Trump and his brand of politics.

Obama spoke of the long talks he and McCain would have privately in the Oval Office and the senator's 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," Obama said in another not-so-veiled nod to 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." Bush said one of the great gifts in his life was becoming friends with his former White House rival. He said they would in later years recall their political battles like former football players remembering the big game.

But mostly Bush recalled a champion for the "forgotten people" at home and abroad whose legacy will serve as a reminder, even in times of doubt, of 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," Bush said.

Bush, a Republican, and Obama, a Democrat, spoke during the service at McCain's request.

Trump was not on hand for the ceremony, after McCain's family made clear he was not invited.

But Meghan McCain made sure Trump was part of the memorial in another way, leveling pointed criticism at the president in 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 lived lives of comfort and privilege while he suffered and served," she said, her voice first choking back tears then raising to anger.

Later, she said to applause, "The America of John McCain has no need to be made great again because America was always great." In another clear swipe at Trump, she said some resented her father for being "a great fire who burned bright" and what he revealed about their own characters. Those critics, she said, still have an opportunity to emulate her father's legacy.

Those gathered Saturday morning to eulogize the six-term senator included three former presidents, scores of members of Congress, current and former world leaders and family and friends. Among those in the front row were Barack and Michelle Obama, George and Laura Bush, Bill and Hillary Clinton, as well as Dick Cheney and Al Gore.

McCain's motorcade arrived from the Capitol, where he laid in state overnight, and the procession made a stop at the Vietnam Veterans Memorial, where McCain's wife, Cindy, placed a wreath. His flag-draped casket was escorted by military body bearers up the cathedral steps under gray skies.

It was the last public event in Washington, where McCain lived and worked over four decades, and part of McCain's five-day, cross-country funeral procession. He died on August 25 at age 81.

"His death seems to have reminded the American people that these values are what makes us a great nation, not the tribal partisanship and personal attack politics that have recently characterized our life, " said former Sen. Joe Lieberman of Connecticut, a longtime friend and fellow global traveler who McCain once considered as his vice presidential running mate.

"This week's celebration of the life and values and patriotism of this hero, I think have taken our country above all that," he said.

"In a way, it's the last great gift that John McCain gave America." Trump, meanwhile, left the White House in the presidential motorcade shortly after 10:30 a.m., as the service was underway, headed to his Virginia golf course.

Two of his top aides, White House chief of staff John Kelly and Defense Secretary James Mattis, flanked Cindy McCain as she placed the wreath at the memorial and joine the service. Trump's daughter Ivanka Trump and son-in-law Jared Kushner are attended.

McCain was a decorated veteran who was held for more than five years as a prisoner of war in Vietnam. He refused early release. Trump obtained deferments for his college education and a foot ailment.

McCain had long urged the Senate and the polarized nation to recognise the humanity even in bitter political opponents. McCain's request for speeches by the former presidents, to some, represents that ideal.