A flyover of military aircraft honoured the former Navy pilot.

John McCain has been laid to rest at the US Naval Academy after five days of events remembering the life of the maverick senator.

A horse-drawn carriage 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 carriage. Joining them were family and friends as well as members of McCain's Class of 1958, military leaders and academy midshipmen.

About 4pm, a flyover of military aircraft honoured the Navy pilot who was shot down over Vietnam and held more than five years as a prisoner of war.

The burial was private as was the wish of Mr McCain, the Arizona Republican and 2008 presidential nominee who died on August 25 from brain cancer aged 81.

One scheduled speaker at the service, Senator Lindsey Graham, said before the service that he would tell the audience that "nobody loved a soldier more than John McCain, that I bear witness to his commitment to have their back, travel where they go, never let them be forgotten".

Also expected to pay tribute were David Petraeus, a retired general and former CIA director, and Mr McCain's son Jack.

People watch as the funeral procession passes
Susan Walsh/AP

As the hearse carrying Mr McCain passed through a gate and into the academy, there was loud applause from the several hundred people lining the street outside on a hot and muggy summer day.

Many held their hands over their hearts and waved American flags. Some shouted "God bless you".

People in the crowd held signs that read "Senator John McCain Thanks For Serving! Godspeed" and "Rest In Peace Maverick."

For his final resting place, Mr McCain picked the historic site overlooking the Severn River, not Arlington National Cemetery, where his father and grandfather, both admirals, were buried.

Years ago Chuck Larson, an admiral himself and an ally throughout Mr McCain's life, reserved four plots at the cemetery - two for Mr McCain and himself, and two for their wives, now widows.

Mr Larson died in 2014, and Mr McCain wrote in a recent memoir that he wanted to be buried next to his friend, "near where it began".

Among the pallbearers on a list provided by Mr McCain's office were Frank Gamboa, his academy roommate; Defence Secretary Jim Mattis; and two men who were POWs with Mr McCain in Vietnam, John Fer and Everett Alvarez Jr.

Tributes to Mr McCain began on Wednesday in Arizona and continued for the remainder of the week.

Former presidents attend the memorial service for John McCain
Pablo Martinez Monsivais/AP

On Saturday, speeches by his daughter Meghan and two former presidents - Republican George W Bush and Democrat Barack Obama - remembered Mr McCain as a patriot who could bridge painful rivalries.

While their remarks made clear their admiration for him, they also represented a repudiation of President Donald Trump's brand of tough-talking, divisive politics. Mr Trump and McCain were at odds during the 2016 campaign and for much of Mr Trump's presidency.

"There's a lesson to be learned this week about John McCain," said Mr Graham.

Meghan McCain speaks at a memorial service for her father
Pablo Martinez Monsivais/AP

"No. 1, Americans appreciate military service. ... If you work hard and do your homework and know what you're talking about, people will listen to you. That if you pick big causes bigger than yourself, you'll be remembered," he told Fox News Sunday.

"He tried to drain the swamp before it was cool, that you can fight hard and still be respected. If you forgive, people appreciate it, and if you admit to mistakes, you look good as a stronger man.

"That's the formula, John McCain. This was a civics lesson for anybody who wanted to listen. Why do we remember this man? Because of the way he conducted his public life."

Postcode iThere are some shows on the STV Player that you can only watch if you live in one of our license regions. Your postcode is a simple and easy way for us to check this.OkayWe need this to check that you live in an STV region.

This field is required.This doesn't appear to be a valid postcode

Would you like us to email you about our great shows and services from time to time?

We'll only send emails we think you'll like (see example) based on information you have supplied and shows you have watched on STV Player. For details on emails and advertising, see our STV & You page.

Would you like to receive emails from the Scottish Children's Lottery about draws, instant games and competitions?

We support the Scottish Children's Lottery (SCL), which is managed by our colleagues at STV ELM Ltd. You can find out more about the SCL on its website, including its Privacy Policy.

LocationPlease tick this box to confirm that you are a resident of the UK, Channel Islands or Isle of Man.This field is required.

Parental ConsentPlease tick this box to confirm that you have received consent from a parent or guardian in order to complete this form and submit your vote.This field is required.

That's you. All that's left is to click the 'Submit Vote' button below. By doing so, you confirm that you and your parent or guardian have read and accept our Voting Terms of Use, Privacy Policy and Cookie policy, and that the details you have entered are correct. We'll look after them as carefully as if they were our own.