The former president said goodbye to his friend and former competitor at McCain's memorial service at Washington National Cathedral on Saturday. McCain died at age 81 last week after losing his battle with glioblastoma, an aggressive form of brain cancer.
During his speech, Obama -- who battled McCain in the 2008 presidential election -- joked about McCain asking him to speak at the service. "John loved being a little unpredictable," he said, as the crowd, which included McCain's family and former presidents Bill Clinton and George W. Bush, bust into laughter.
"What better way to get a last laugh than to get George and I to say nice things about him to a national audience?" Obama asked with a chuckle. He noted McCain "made us better presidents. Just as he made the Senate better. Just as he made this country better."
Former President Barack Obama says he and George W. Bush were fortunate to compete with John McCain for the White House. "He made us better presidents. Just as he made the Senate better. Just as he made this country better." pic.twitter.com/XRQ0KoF3jn
The politician, whose speech followed Bush's, also opened up about the "longstanding admiration" he had for McCain, even when the Arizona senator called him "once a day" to tell him he was "screwing up."
"John was a pretty conservative guy. Trust me, I was on the receiving end of some of those votes. But he did understand that some principles transcend politics," Obama said, before remembering how McCain famously stood up for him when his patriotism was challenged during the 2008 campaign.
"I was grateful, but I wasn't surprised," he explained. "I never saw John treat anyone differently because of their race, religion or gender. And I'm certain in those moments that were referred to in the campaign, he saw himself as defending America's character, not just mine."
Obama also revealed that he and McCain would have private meetings in the White House during his time as president. "Those were real, and they were often deep. But we enjoyed the time we shared away from the bright lights," he recalled. "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. We never doubted we were on the same team."
"We laughed with each other. And we learned from each other." Barack Obama describes the private Oval Office conservations he'd have with John McCain pic.twitter.com/rBz4aFrNoO
Former Vice President Joe Biden (who broke down in tears at McCain's funeral on Thursday), actor Warren Beatty and former mayor Michael Bloomberg were pallbearers on Saturday.
President Donald Trump, whom McCain notably sparred with on several occasions in Washington, was not in attendance, but his daughter, Ivanka Trump, and her husband, Jared Kushner, were. See more on McCain in the video below.