The ceremony in the US capital was the highlight of a week of tributes to the veteran and 35-year veteran of Congress who served in both the House of Representatives and the Senate before succumbing to a rare form of brain cancer on August 25 at the age of 81.
Rain briefly poured down as McCain's coffin draped in the US flag was carried up the steps to the Capitol Rotunda, where he lay in state on Friday. McCain's coffin was rested on the same catafalque that had supported Abraham Lincoln's remains as senior members of Congress, his longtime friends, political allies and occasional foes paid tribute to his controversy-filled life.
His wife of 38 years, Cindy, appeared to be praying through much of the service.
"We gather to mourn a great loss and celebrate a great life," Senate Majority Leader Mitch McConnell said.
McCain, who had suffered years of torture as a prisoner of war during was opposed to the widespread use of torture by the US government during President George W. Bush's so-called Global War on Terror in the first decade of this century.
In his passion for the causes he espoused, McConnell recalled, McCain always "relished the fight."
However, the Senate Majority leader continued, McCain endured to become "a generational leader in the US Senate… This is one of the bravest souls our nation has ever produced… He would fight tooth and nail for his vision of the common good… He had America's fighting spirit," McConnell said.
Vice President Mike Pence said McCain shared his passions for tax reform and limited government.
"We respect his service to our country," the vice president said.
Pence represented the Trump administration at the funeral. However, President Donald Trump, who has repeatedly clashed with McCain over the past three years, did not attend. McCain fiercely opposed Trump's rise in the national Republican Party but was unable to do anything to prevent it.
"On behalf of a grateful nation we will forever remember that… John McCain served his country honorably," Pence said.
Ordinary people shared in the solemn atmosphere of the occasion.
"I came here because I am also a Vietnam veteran. I did not know Senator McCain personally, but I respect him," Marine Corps Veteran Stephen Patten from California told Sputnik.
The ceremony was "very moving and unifying… A lot of people of different levels came here for one purpose," he said.
Navy veteran Chris Wiber said McCain would remain a national inspiration.
"I graduated Naval Academy 14 years after the Senator. I think our country may learn on his example," Wiber said.
The late senator sponsored punitive sanctions on Russia and had a reputation as a hawk for promoting a hard-line interventionist foreign policy and military engagement to the very end. He was a bitter critic of Trump on the issue and opposed the US president's calls to improve relations with Russia.
McCain, who served as chairman of the Senate Armed Services Committee and had the latest defense spending bill named after him, became the Republican presidential nominee in 2008, but lost the race for the US presidency to Barack Obama.
On Saturday, McCain's funeral will pass the Vietnam Memorial on the National Mall a formal service will be held at Washington National Cathedral where his two long-time political opponents former Presidents George W. Bush and Barack Obama will both speak at his request.