WASHINGTON — Sen. John McCain's funeral Saturday mixed a solemn national memorial to his life with a striking rebuke to President Trump, whose influence on civic life served as an unmistakable backdrop.

Under the soaring arches of the National Cathedral, former presidents George W. Bush and Barack Obama, McCain's family, and his friends turned a service draped in national grandeur into a bipartisan tribute to decency and honor, and an affirmation of values they admired in McCain and fear have come under threat.

McCain's daughter Meghan made the message clear.

"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 in a passionate eulogy for a Vietnam War hero, former presidential nominee, and statesman who spent more than 30 years in the Senate.

With her father's flag-draped casket before her and some of Trump's top aides in the audience, she later added, "The America of John McCain has no need to be made great again, because America was always great."

Watch: 

Trump, meanwhile, was uninvited to an august gathering that drew three former presidents, their wives, two ex-vice presidents, and much of official Washington, including a significant showing from the Senate and U.S. House. During the funeral, he tweeted about the North American Free Trade Agreement and traveled to his golf course in Virginia.

The funeral was the final public event after a week of McCain commemorations that had drawn implicit contrasts between the values he espoused and the ones he detested in Trump. This one made the contrast explicit.

Bush and Obama, each of whom had defeated McCain in elections and represented different parts of the political spectrum, delivered eulogies that united around themes of respect, compassion, the rule of law, and integrity, even among rivals.

"He respected the dignity inherent in every life, a dignity that does not stop at borders and cannot be erased by dictators," Bush said. "Perhaps above all, John detested the abuse of power. He did not abide bigots and swaggering despots."

"So much of our politics, our public life, our public discourse, can seem small, and mean and petty," Obama said. "Trafficking in bombast and insult and phony controversies and manufactured outrage, it's a politics that pretends to be brave and tough but in fact is born of fear. John called on us to be bigger than that; he called on us to be better than that."

It was a remarkable infusion of politics into the kind of national mourning reserved for American giants. But from Meghan McCain's speech, the choice of speakers, and the decision to leave out Trump, it seemed clear that it was what the defiant Arizona senator had orchestrated.

"His final message is, 'We are a stronger nation when we work together,' " said former Pennsylvania Gov. Tom Ridge, a Republican who served as one of McCain's pallbearers.

He said the invitations to former political opponents Bush and Obama spoke to McCain's values.

"He respected their code of conduct, their moral code," Ridge said in an interview Friday. "He didn't agree [with them] necessarily, but he respected their leadership … how they comported themselves as president of the United States and leader of the free world."

Ridge and McCain entered Congress together in 1983, and bonded over their shared service in Vietnam.

McCain, a fighter pilot and Vietnam War hero who refused an early release from a prisoner of war camp despite enduring years of torture, would go on to serve more than 30 years in the House and Senate, win the Republican presidential nomination in 2008, and become a towering figure in U.S. politics, known for his hot temper, salty humor, and strong convictions.

The funeral was the final public memorial for McCain. He is to be buried in a private ceremony Sunday in Annapolis at the U.S. Naval Academy Cemetery, by his alma mater.

His willingness, even in death, to take on a president of his own party gave one final glimpse of the unpredictable style that attracted bipartisan praise, despite a complex record that even McCain acknowledged didn't always live up to his ideals.

The national outpouring since his death, in turn, has seemed to pay tribute not just to his military service and public career, but also a style of public conduct that has been eroded by hardening political divides, attacks, and grievance — factors that Trump has amplified and utilized as part of his political appeal.

With members of a sharply divided Congress looking on Saturday, Bush said that if ever Americans "forget who we are or grow weary of our cause, John's voice will always come as a whisper over our shoulder: We are better than this. America is better than this."

Obama recounted meeting privately with McCain in the White House, often disagreeing but recognizing "we were on the same team."

"He did understand that some principles transcend politics, that some values transcend party," Obama said. "He considered it part of his duty to uphold those principles and uphold those values."

Among the more touching scenes was McCain's 106-year-old mother, Roberta, watching from a wheelchair at the top of the cathedral steps as her son's casket was placed into the hearse following the service.

The funeral came after McCain's wife, Cindy, placed a wreath at the Vietnam Memorial Saturday morning. The Arizona senator had lain in state overnight in the rotunda of the U.S. Capitol, a short walk from the Senate floor.

Cindy McCain, wife of, Sen. John McCain, (R., Ariz.), lays a wreath at the Vietnam Veterans Memorial in Washington Saturday during a funeral procession to carry the casket of her husband from the U.S. Capitol to the National Cathedral for a memorial service.
Andrew Harnik, Pool / AP
Cindy McCain, wife of, Sen. John McCain, (R., Ariz.), lays a wreath at the Vietnam Veterans Memorial in Washington Saturday during a funeral procession to carry the casket of her husband from the U.S. Capitol to the National Cathedral for a memorial service.

Top Trump aides, including his daughter Ivanka and her husband, Jared Kushner, attended the service, along with White House chief of staff John Kelly and national security adviser John Bolton.

Former President Bill Clinton and his wife, former presidential nominee and senator Hillary Clinton, were among those in the audience, which drew an array of current and former senators, U.S. House members, and national leaders. Bob Dole, another former Republican presidential nominee and war veteran, was another notable presence, as were former vice presidents Dick Cheney and Al Gore.

Television cameras captured Bush sneaking a piece of candy to former first lady Michelle Obama.

Notably unwelcome was McCain's vice presidential nominee, Sarah Palin, whose sharp-edged approach foreshadowed the resentment politics that Trump has embraced.

Along with the political messages were warm remembrances.

Joe Lieberman, a former Democratic senator whom McCain almost picked as his vice presidential nominee, spoke about traveling the world with McCain, and noted that whenever they visited the leaders of a repressive nation, McCain insisted on also sitting with human rights groups.

He also prompted laughter when the observant Jew cracked that McCain got the last laugh by having his funeral on a Saturday, forcing Lieberman to walk there.

Meghan McCain recounted not just McCain's military heroism, but also her father's love.

"When my father got sick and I asked him what he wanted me to do with this eulogy, he said, 'Show them how tough you are,' " McCain said, fighting through sobs. "That is what love meant to John McCain."

From left, former first lady Laura Bush, former President Bill Clinton, former Secretary of State Hillary Clinton, former vice president Dick Cheney and his wife Lynne and former vice president Al Gore arrive at a memorial service for Sen. John McCain, R-Ariz., at Washington Nationals Cathedral in Washington, Saturday, Sept. 1, 2018.
Pablo Martinez Monsivais / AP
From left, former first lady Laura Bush, former President Bill Clinton, former Secretary of State Hillary Clinton, former vice president Dick Cheney and his wife Lynne and former vice president Al Gore arrive at a memorial service for Sen. John McCain, R-Ariz., at Washington Nationals Cathedral in Washington, Saturday, Sept. 1, 2018.