John McCain, the veteran senator who emerged as the most visible Republican critic of Donald Trump, was laid to rest at the US Naval Academy in Annapolis, Maryland, after a private ceremony on Sunday.
Four naval jets performed an aerial salute with a single F-18 fighter peeling off into the sun as part of the missing man formation.
The funeral concluded a week of memorials for McCain, who died on August 25, at the age of 81, from brain cancer.
He trained at the naval academy, graduating in 1958, before serving in Vietnam as a fighter pilot.
A horse-drawn caisson carrying the senator's casket led a procession of mourners from the academy's chapel to its cemetery following a private service.
The senator's widow, Cindy, and his children were among those who walked behind the casket. Joining them were family and friends as well as members of McCain's class of 1958, military leaders and academy midshipmen.
Prominent political leaders gathered a day earlier to remember the Arizona senator at the Washington National Cathedral
Two former presidents were among those to offer tributes, which included a string of references to his ability to bridge rivalries in a reminder that the country is currently led by a president known for a brash brand of divisive politics.
His daughter, Meghan McCain, offered the bluntest attack on Mr Trump, who had had mocked her father’s Vietnam record as a prisoner of war.
"The America of John McCain has no need to be made great again because America was always great,” she declared with a steely glint in her eye.
On Sunday, McCain was buried beside his classmate, Admiral Chuck Larson, who had reserved four burial plots for the two friends and his wife.
"Chuck has his wingman back now," Sarah Larson, the late admiral's wife, told CNN.