Two former presidents and the top brass of America's political world came together to remember Senator John McCain in Washington, speaking to the late political titan's world view and life in terms that indirectly rebuked the divisive politics of President Donald Trump.

In a service at the Washington National Cathedral, McCain's friends and political foes spoke kindly of the man, describing him as a man of integrity and dignity who exemplified an American ideal — and one who never wavered in his belief in American greatness.

Speaking on Saturday morning, McCain's daughter Meghan McCain, praised her father and indirectly cast his character as the antithesis to Mr Trump, who was not invited to the service even as former presidents Barack Obama and George Bush were asked to speak.

"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," Ms McCain said of her father.

The mourners in Washington included some of the most powerful and well known of the Washington elite, including Mr Obama and Mr Bush, as well as former president Bill Clinton, former Secretary of States Hillary Clinton and Henry Kissinger, as well as former Senator Joe Lieberman.

In his remarks, Mr Obama echoed the sentiment of Ms McCain, noting that he had frequently sparred with the late senator during his presidency, but praising him as a patriot devoted to the United States and belief in the country as an unwavering symbol of good in the world. In doing so, Mr Obama placed McCain among the ranks of President John F Kennedy and President Ronald Reagan, drawing a subtle contrast between these American leaders and the current leadership in the White House.

"John understood, as JFK understood, as Ronald Reagan understood — that part of what makes our country great is that our membership is based not on our bloodline, not on what we look like, not on what our last names are, not based on where our parents or grandparents came from or how recently they arrived – but on adherence to a common creed that all of us are created equal. Endowed by our creator, certain inalienable rights.”

Mr Bush, in his eulogy, focused solely on Mr McCain — a man who he had also sparred with during his presidency.

"Some lives are so vivid, it is difficult to imagine them ended; some voices are so vibrant and distinctive, it is hard to think of them stilled," Mr Bush said. "A man who seldom rested is laid to rest and his absence is tangible, like the silence after a mighty roar".

The service was the last in a series of ceremonies held to honour the late senator, who had been mourned in Phoenix and laid in state in the Capitol rotunda.

During the service in Phoenix, former vice president Joe Biden declared that McCain was a friend and figure who represented American greatness, even if the two had sparred politically during their decades of service in Washington.

"I always thought of John as a brother. We had a hell of a lot of family fights," a teary Mr Biden said.

"We will not see his like again," he concluded.

McCain was a six-term senator and war hero who spent years in captivity during the Vietnam war, where he largely thwarted attempts to force him into playing into propaganda efforts against the US.

He would later come to be a Republican senator and congressman who was known to buck his party on issues of import, and cast a shocking vote against Mr Trump's effort to repeal Obamacare in what was one of his last major actions in Washington.