Barack Obama said being asked to speak at John McCain's funeral was a 'precious and singular honor', but joked he had worked out why he and Bush - his political opponents - had been asked.
'What a better way to get a last laugh than to get George and I to say nice things about him to a national audience,' he said, lightening an otherwise emotional tribute.
Obama and McCain were both in the race to become President in 2008, and though the democratic candidate won, the pair made headlines for how quickly they sat down after the election to find ways to work together.
Scroll down for video
Former President Barack Obama delivered a touching eulogy to Republican Senator John McCain on Saturday (pictured)
The pair were pitted against each other for the Presidency in 2008 (pictured in 2008) and while Obama won the race, the pair quickly sat down to decide how they would work together
'We come to celebrate an extraordinary man. A warrior, a statesman, a patriot, who embodied so much that is best in America,' he said.
'President Bush and I are among the fortunate few who competed against John at the highest level of politics.
'He made us better Presidents, as he made the Senate better, as he made the country better.'
In what could be seen as a shot at current President Donald Trump, who was banned from the ceremony, the former President said McCain's version of politics was cleaner than the one seen today, and more respectful.
'So much of our politics, our public life, our public discourse can seem small and mean and petty,' he 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.'
While Obama appeared to be tearing the President down, the President was trying to tear down trade relations with Canada - and get in a round of golf.
In a series of tweets, Trump told Canada it 'will be out' of a revised North American trade agreement unless it's 'fair' to the United States, and threatened to scrap the current deal should Congress 'interfere' with the negotiations.
'There is no political necessity to keep Canada in the new NAFTA deal,' Trump said in one of a series of tweets as he visited his Virginia golf club.
Obama noted McCain was always a bit of a troublemaker, who would not allow himself to be pushed into a box of what his high office should bind him to do.
'He had a disdain for self pity. He had been to hell and back, and he never lost his optimism or his zest for life,' he said.
Obama said he admired McCain, and would often spend time with him privately
'He maintained his buoyant spirit until the end, too stubborn to sit still, devoted to his friends, and most of all to his family.
'For all our differences, for all the times we sparred, I never tried to hide and I think John came to understand, the longstanding admiration I had for him.'
When McCain pushed back against protesters who questioned Obama's patriotism, Obama said he was 'grateful, but not surprised'.
'That's just who John was,' he said.
Obama said for all the stories of John's quick temper, the Arizona man was quick to move on from an argument and quick to forgive.
'He knew more than most his own flaws, his blind spots - he knew how to laugh at himself,' he said.
'We didn't advertise it, but every so often over the course of my presidency, John would come over to the white house and we'd sit and we'd talk.
'Our disagreements didn't go away during those private conversations, but we enjoyed the time we shared away from the bright lights.
'We learned from each other, and we never doubted the other man's sincerity, or the other man's patriotism.
'We never doubted we were on the same team.'
Obama said the pair would always disagree, but he knew John had strong good values and a strong love for his country, that would ultimately land them on the same team