Senator John McCain died on August 25 of brain cancer, days shy of his 82nd birthday.
Former US presidents Barack Obama and George W. Bush gathered with thousands of fellow mourners on Saturday to honour the late John McCain, the longtime Arizona senator and Vietnam war hero whose bids for the White House were dashed by the two men.
McCain's body, which had lain in state at the US Capitol, arrived at the Washington National Cathedral after his motorcade first stopped at the Vietnam Veterans Memorial, where his wife, Cindy McCain, laid a wreath to honour those who died in the war.
From Washington, TRT World's North America Correspondent Jon Brain reports.
Members of the military slowly carried McCain's coffin into the cathedral, past friends and loved ones who have counted among the top power players in US politics for decades. Conspicuously absent was Republican President Donald Trump.
McCain asked Obama and Bush, a Democrat and a Republican, to deliver eulogies at his service, in what was seen as a final message to the country about his wish for bipartisanship.
The statesman and former prisoner of war died August 25 of brain cancer, days shy of his 82nd birthday.
Lionel Donovan has more from the US capital Washington DC.
Trump, who feuded with McCain and criticised his war record, spent the morning sending tweets about other subjects.
As he did so, top members of his administration including his daughter Ivanka, son-in-law Jared Kushner, chief of staff John Kelly and national security adviser John Bolton were present at the solemn cathedral service.
McCain's family had made clear that Trump was not welcome at memorial services in Arizona and Washington or at Sunday's private burial service in Annapolis, Maryland, at the US Naval Academy. McCain was a member of the Academy's Class of 1958.
Inside the cathedral, guests included former President Bill Clinton and former Secretary of State Hillary Clinton, comedian Jay Leno, former Senator Bob Dole and others joined together to honour McCain while a powerful pipe organ and brass ensemble played in the background.
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 McCain's political life.
McCain, who rose to the rank of captain in the US Navy, was shot down over Hanoi while on a bombing mission in 1967.
Held as a prisoner until 1973, McCain was tortured by his North Vietnamese captors in a jail that Americans dubbed the "Hanoi Hilton."