Former President Barack Obama delivered a eulogy for the late Sen. John McCain during a Saturday morning funeral service at the Washington National Cathedral.

In his remarks, Obama urged leaders and citizens to look beyond "mean and petty" politics to uphold American ideals of equality and greatness in McCain's honor.

Obama was one of the three past presidents in attendance alongside a crowd of Washington heavyweights.

President Donald Trump was reportedly asked not to attend.

Former President Barack Obama delivered a glowing eulogy at the late Sen. John McCain's funeral service Saturday morning that urged American citizens and leaders to follow McCain's example and abandon "mean and petty" politics.

In his remarks, Obama said a fitting celebration of the former senator's life would come in "trying to do better" and be worthy of the "great inheritance that our founders bestowed," on the country.

"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."

Obama continued: "John called on us to be bigger than that. He called on us to be better than that."

"It's demanded of all of us as citizens of this great republic," Obama said. "That's perhaps how we honor him best. By recognizing that there are some things bigger than party or ambition or money or fame or power. That there's some things that are worth risking everything principles that are eternal. Truths that are abiding."

One of McCain's former opponents in the race to the presidency, Obama said it was McCain's ability to look beyond party lines in the name of service that made him an exemplary leader.

"We were standard bearers of different American political traditions and throughout my presidency, John never hesitated to tell me when he thought I have screwing up, which by his calculation was about once a day," Obama

"But for all our differences ... We never doubted the other man's sincerity or the other man's patriotism, or that when all was said and done we were on the same team," Obama said.

Obama spoke after former President George W. Bush, another man to whom McCain lost a presidential bid, and one of several Washington heavyweights who attended the funeral service. Former president Bill Clinton and former secretary of state Hillary Clinton were also in attendance.

President Donald Trump, who infamously mocked McCain's military service during the 2016 campaign and tore into him several times after taking office, was reportedly asked not to attend. Trump asked defense secretary James Mattis, chief of staff John Kelly, and national security adviser John Bolton to attend the service on behalf of the administration.

Obama praised McCain's military service and duty to country on Saturday, placing emphasis on the five years McCain spent as a prisoner of war in Vietnam.

"Others this week and this morning have spoken to the depths of his torment and the depths of his courage there in the cells of Hanoi when, day after day, year after year, a youthful iron was tempered into steel," Obama said. "In captivity, John learned, in ways that few of us ever will ... how each moment, eacy day, each choice is a test. And John McCain passed that test again and again and again."

Many of McCain's Senate colleagues and several members of the House of Representatives were also there, as was former vice president Al Gore and former secretary of state John Kerry.

After McCain's death, politicians spoke out in praise of McCain's ability to unite those from different backgrounds and ideologies.

Sen. Jeff Flake of Arizona said on CBS's "Face the Nation" last week that McCain's choice to include his former running opponents was a significant reach across the political divide that represents McCain's style.

"These were bitter contests, both of them," Flake said. "To ask them to speak at your funeral and for them to be honored at the opportunity, that tells you all you need to know."

The service, carefully planned by McCain’s family and reportedly by McCain himself, included moving renditions of some of his favorite hymns: "America the Beautiful," "The Battle Hymn of the Republic" and "Amazing Grace." The Cathedral Choir, the United States Naval Academy Glee Club and the United States Navy Band Brass Ensemble will perform.

McCain's daughter, Meghan, delivered remarks, along with former senator Joe Lieberman and former secretary of state Henry Kissinger. Two other McCain children, James and Sidney, will also do readings, along with Sen. Lindsey Graham and former Sen. Kelly Ayotte.