The casket of Sen. John McCain, R-Ariz., is carried out of the Washington National Cathedral in Washington, Saturday, Sept. 1, 2018, after a memorial service, as Cindy McCain is escorted by her son Jimmy McCain and other family members. (AP Photo/Susan Walsh)

Former President Barack Obama pauses as he speaks at a memorial service for Sen. John McCain, R-Ariz., at Washington National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. (AP Photo/Pablo Martinez Monsivais)

Former President George W. Bush speaks at a memorial service for Sen. John McCain, R-Ariz., at Washington National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. (AP Photo/Pablo Martinez Monsivais)

From left, Meghan McCain, Cindy McCain, Jimmy McCain and his wife Holly pause as they watch the casket of Sen. John McCain, R-Ariz., arrive at the Washington National Cathedral in Washington, Saturday, Sept. 1, 2018, for a memorial service. McCain died Aug. 25 from brain cancer at age 81. (AP Photo/Susan Walsh)

The family of Sen. John McCain, R-Ariz., including from left, Andrew McCain, Doug McCain, second from left, Meghan McCain, from front row left, Bridget McCain, Cindy McCain, Jimmy McCain and Jack McCain, watch as the casket is carried down the steps of the U.S. Capitol in Washington, Saturday, Sept. 1, 2018, in Washington, for a departure to the Washington National Cathedral for a memorial service. (Marvin Joseph/The Washington Post via AP, Pool)

Cindy McCain arrives at a memorial service for her husband, Sen. John McCain, R-Ariz., at the Washington National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. Watching in the front row from left are President George W. Bush, former first lady Laura Bush, former President Bill Clinton, former Secretary of State Hillary Clinton, former Vice President Dick Cheney and his wife Lynne. (AP Photo/Pablo Martinez Monsivais)

Former President Barack Obama speaks at a memorial service for Sen. John McCain, R-Ariz., at Washington National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. (AP Photo/Pablo Martinez Monsivais)

The family of Sen. John McCain, R-Ariz., follows as his casket is carried during the recessional at the end of a memorial service at Washington National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. (AP Photo/Pablo Martinez Monsivais)

Dignitaries and invited guests attend a memorial service for Sen. John McCain, R-Ariz., at Washington National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. (AP Photo/Pablo Martinez Monsivais)

Former President Barack Obama speaks at a memorial service for Sen. John McCain, R-Ariz., at Washington National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. (AP Photo/Pablo Martinez Monsivais)

The family of Sen. John McCain, R-Ariz., front row from left, Meghan McCain, Bridget McCain and Cindy McCain, watches as his casket is carried to a hearse from the U.S. Capitol in Washington, Saturday, Sept. 1, 2018, in Washington, for a departure to the Washington National Cathedral for a memorial service. (Jim Lo Scalzo/Pool Photo via AP)

Former Secretary of State Henry Kissinger speaks at a memorial service for Sen. John McCain, R-Ariz., at Washington National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. (AP Photo/Pablo Martinez Monsivais)

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 National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. (AP Photo/Pablo Martinez Monsivais)

Former President Barack Obama hugs former vice president Al Gore as former first lady Michelle Obama watches before the memorial services for Sen. John McCain, R-Ariz., at Washington National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. (AP Photo/Pablo Martinez Monsivais)

The flag-draped casket of Sen. John McCain, R-Ariz., is carried to a hearse from the U.S. Capitol in Washington, Saturday, Sept. 1, 2018, in Washington, for a departure to the Washington National Cathedral for a memorial service. McCain died Aug. 25 from brain cancer at age 81. (AP Photo/Jose Luis Magana)

A crowd gathers before Cindy McCain, wife of, Sen. John McCain, R-Ariz., arrives to lay a wreath at the Vietnam Veterans Memorial in Washington, Saturday, Sept. 1, 2018, during a funeral procession to carry the casket of her husband from the U.S. Capitol to National Cathedral for a memorial service. McCain served as a Navy pilot during the Vietnam War and was a prisoner of war for more than five years. (AP Photo/Andrew Harnik, Pool)

Cindy McCain, wife of, Sen. John McCain, R-Ariz., accompanied by President Donald Trump's Chief of Staff John Kelly, left, and Defense Secretary Jim Mattis, second from left, lays a wreath at the Vietnam Veterans Memorial in Washington, Saturday, Sept. 1, 2018, during a funeral procession to carry the casket of her husband from the U.S. Capitol to National Cathedral for a Memorial Service. McCain served as a Navy pilot during the Vietnam War and was a prisoner of war for more than five years. (AP Photo/Andrew Harnik, Pool)

The flag-draped casket of Sen. John McCain, R-Ariz., is carried up the steps of the U.S. Capitol, Friday, Aug. 31, 2018, in Washington as Cindy McCain, top right, joined by her sons Jack McCain, and Jimmy McCain, right, watch. (Jim Lo Scalzo/Pool Photo via AP)

The flag-draped casket of Sen. John McCain, R-Ariz., lies in state at the U.S. Capitol, Friday, August 31, 2018 in Washington. Seated third from left is Cindy McCain and Vice President Mike Pence to her right. (Kevin Dietsch/Pool photo via AP)

Members of the public walk past the flag-draped casket bearing the remains of John McCain of Arizona, who lived and worked in Congress over four decades, in the U.S. Capitol rotunda in Washington, Friday, Aug. 31, 2018. McCain was a six-term senator from Arizona, a former Republican nominee for president, and a Navy pilot who served in Vietnam where he endured five-and-a-half years as a prisoner of war. He died Aug. 25 from brain cancer at age 81. (AP Photo/J. Scott Applewhite)

Cindy McCain, wife of Sen. John McCain, R-Ariz., leans on his flag-draped casket during a farewell ceremony in the U.S. Capitol rotunda, Friday, Aug. 31, 2018, in Washington. McCain was a six-term senator, a former Republican nominee for president, and a Navy pilot who served in Vietnam, where he endured five-and-a-half years as a prisoner of war. He died Aug. 25 from brain cancer at age 81. (AP Photo/J. Scott Applewhite)

The flag-draped casket bearing the remains of Sen. John McCain of Arizona, who lived and worked in Congress over four decades, is carried into the U.S. Capitol rotunda, followed by his widow, Cindy McCain, upper right, for a farewell ceremony and public visitation, Friday, Aug. 31, 2018, in Washington. (AP Photo/J. Scott Applewhite)

Meghan McCain speaks at a memorial service for her father, Sen. John McCain, R-Ariz., at Washington National Cathedral in Washington, Saturday, Sept. 1, 2018. McCain died Aug. 25, from brain cancer at age 81. (AP Photo/Pablo Martinez Monsivais)

WASHINGTON (AP) -- John McCain's daughter and two former presidents led a public rebuke of President Donald Trump's divisive politics at the late senator's memorial service Saturday 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.

Standing near McCain's flag-draped casket and with Trump's daughter in the audience, Meghan McCain delivered a broadside against the uninvited president without mentioning his name.

"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, it rose in anger.

"The America of John McCain," she added, with a reference to Trump's trademark phrase, "has no need to be made great again because America was always great."

The audience of Washington power players erupted in applause.

Trump has dismissed the idea that McCain, a prisoner of war in Vietnam, was a hero. The president made clear he resented McCain's thumbs-down vote last year that sank the Republican attempt to repeal national health care. And he only marked McCain's passing on Aug. 25 with traditional presidential actions after he came under fire from the American Legion.

Trump chose to head to his Virginia golf course during Saturday's service and tweeted his grievances against the FBI and NAFTA throughout the day. In one missive, he misspelled former President Barack Obama's first name. He sent Ivanka Trump, her husband Jared Kushner, Defense Secretary James Mattis and others to the service to represent the administration.

McCain asked Obama, a Democrat, and George W. Bush, a Republican, to speak at his memorial service and they gave personal testimony that overcoming rivalries and partisan politics was not only possible but good for the country. Both men had denied McCain's presidential aspirations. But they spoke of reconciling with him during personal moments afterward, and, as Bush said, "the rivalry melted away."

In separate eulogies, Obama and Bush also delivered pushback to Trump that was more subtle than Meghan McCain's but unmistakable nonetheless.

Obama spoke of the long talks he and McCain had almost weekly 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, trafficking in bombast and insult and phony controversies and manufactured outrage," Obama said in a 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.

Washington's past and present political elite bore witness. Among those in the front row at the cathedral were Michelle Obama, 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.

At the cathedral, Mrs. McCain broke down as opera singer Renee Fleming sang "Danny Boy," at the request of the music-loving late senator.

The service 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 Aug. 25 at age 81.

"This week's celebration of the life and values and patriotism of this hero, I think have taken our country above all that," said former Sen. Joe Lieberman, considered by McCain as a running mate in 2008. McCain instead chose former Alaska Gov. Sarah Palin. But she, a populist firebrand with similarities to Trump, was not invited to any of the services.

The events, a sort of rolling metaphor for the contrast between the nation under Trump and McCain's hopes for the country was, in a way, "the last great gift that John McCain gave America," Lieberman said.

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

"We weaken our greatness when we confuse our patriotism with tribal rivalries that have sown resentment and hatred and violence in all the corners of the globe," McCain wrote in his farewell letter to the nation, read posthumously by a longtime aide. "We weaken it when we hide behind walls, rather than tear them down, when we doubt the power of our ideals, rather than trust them to be the great force for change they have always been."

McCain is to be buried Sunday at his alma mater, the U.S. Naval Academy, next to his best friend from the Class of 1958, Adm. Chuck Larson.

"Back," McCain wrote on the last page of his recent memoir, "where it began."

___

Lisa Mascaro and Zeke Miller in Washington and Catherine Lucey in Sterling, Virginia, contributed.

___

Follow Kellman on Twitter at http://www.twitter.com/APLaurieKellman