WASHINGTON (Reuters) - Former U.S. presidents Barack Obama and George W. Bush, once rivals of the late Senator John McCain, praised him in eulogies on Saturday and joined his daughter at a memorial service in subtle and not-so-subtle rebukes of President Donald Trump.

Without naming Trump, who did not attend the service, Meghan McCain condemned the president in remarks that at times drew applause and came after she said her dad told her to “show them how tough you are” with 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 live lives of comfort and privilege while he suffered and served,” she said, speaking forcefully and, at times, through tears.

Taking aim at Trump’s campaign slogan, “Make America Great Again,” she said McCain’s America was always great.

For years Trump feuded publicly with McCain and mocked his military service, continuing to knock him even after he grew ill. The former Republican senator from Arizona died on Aug. 25 from brain cancer, days shy of his 82nd birthday.

Trump, also a Republican, spent Saturday tweeting on other subjects and went to one of his private golf clubs in Virginia.

Nearly every major U.S. political leader attended the memorial service, and while Trump himself was absent, his presence was felt through the content of the tributes.

Slideshow ( 29 images )

And by design, McCain asked Obama and Bush to deliver eulogies while the family made clear that Trump was not welcome.

Obama, who beat McCain in the 2008 U.S. presidential election, hailed the one-time prisoner of war for his commitment to truth and core democratic values, qualities that some critics see lacking in Trump, a former reality television star and New York City real estate mogul.

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

Obama also noted McCain’s support for a free press. Trump has repeatedly called the media the enemy of the American people.

“HE COULD NOT ABIDE BIGOTS AND SWAGGERING DESPOTS”

Bush, in his eulogy, described McCain as a man with a code.

Slideshow ( 29 images )

“He loved freedom with a passion of a man who knew its absence. 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 could not abide bigots and swaggering despots.”

Trump has sought to forge close relationships with North Korean leader Kim Jong Un and Russian President Vladimir Putin.

The former U.S. presidents joked about McCain’s imperfections, while saying he made them better leaders. Their presence as eulogists was a clear signal from McCain of his desire for more civility and bipartisanship in Washington.

The senator’s body, which had lain in state at the U.S. Capitol, arrived at the cathedral with a motorcade that first stopped at the Vietnam Veterans Memorial. There his wife, Cindy McCain, laid a wreath to honor those who died in the war.

Uniformed members of the military slowly carried the coffin into the soaring cathedral and back out again after the 2-1/2 hour service.

Top members of Trump’s administration, including his daughter Ivanka and son-in-law Jared Kushner, attended, as did White House chief of staff John Kelly and national security adviser John Bolton.

Other guests included former President Bill Clinton and former Secretary of State Hillary Clinton, former Republican presidential nominee Mitt Romney, comedian Jay Leno, and former senators Bob Dole and John Kerry.

A powerful pipe organ and Navy brass ensemble played during the service and renowned opera singer Renee Fleming sang a stirring rendition of “Danny Boy,” drawing tears from Cindy McCain and others in the audience.

John McCain was a leading voice for revamping the country’s immigration, campaign finance and environmental laws. But it was his military service, punctuated by years as a prisoner of war in North Vietnam, that molded his political life.

Rising to the rank of captain in the U.S. Navy, he was shot down over Hanoi while on a bombing mission in 1967. Held as a prisoner until 1973, he was tortured by his North Vietnamese captors in a jail that Americans dubbed the “Hanoi Hilton.”

As a presidential candidate, Trump mocked McCain for getting captured in Vietnam. Trump himself received five deferments that got him out of serving in the military.

On Sunday McCain will be buried during a private service in Annapolis, Maryland, at the U.S. Naval Academy. McCain was a member of the Academy’s Class of 1958.