Media playback is unsupported on your device Media caption It is the first time sailors have ever performed the ceremony

Royal Navy sailors have performed the Changing of the Guard outside Buckingham Palace for the first time in the ceremony's 357-year history.

Eighty-six sailors from 45 Royal Navy ships and establishments spent a month preparing ahead of the first ceremony on Sunday morning.

Warrant Officer Eddie Wearing said it was a "massive privilege".

The ceremony is usually carried out by one of the five Foot Guards Regiments from the Army's Household Division.

Image copyright PA Image caption Eighty-six sailors from 45 Royal Navy ships and establishments spent a month preparing

The sailors marched to the Game of Thrones theme tune as crowds gathered around the palace gates to watch.

Second Sea Lord Vice Admiral Jonathan Woodcock tweeted that watching the event was a "highly emotional moment" and he was "so proud" of the Royal Navy.

Image copyright Getty Images Image caption The sailors marched to the Game of Thrones theme tune

Image copyright Getty Images Image caption The Royal Navy has been training for a month for the historic occasion

The change in personnel is to mark 2017 as the "Year of the Navy", which former defence secretary Sir Michael Fallon called "the start of a new era of maritime power".

What is the Changing the Guard?

Image copyright Getty Images

Changing the Guard can be traced back to King Henry VII, when a royal bodyguard was first created.

It is the ceremony where one set of guards - the Old Guard - hands over the responsibility of protecting Buckingham Palace and St James's Palace to another set of guards - the New Guard.

The Old Guard march from the forecourt of Buckingham Palace at 11:00 GMT, accompanied by a regimental band.

The New Guard then march, again with a band, from Wellington Barracks to take over.

It draws many tourists, taking place every other day during the winter months and every day over the summer.

The ceremony itself has been taking place since the restoration of King Charles II in 1660.

The sailors have been training at the Royal Navy's headquarters in Portsmouth.

Lt Cdr Steve Elliott, 44, from Portsmouth, will be Captain of the Queen's Guard - believed to be the first in the Royal Navy since Sir Walter Raleigh in 1587.

"As we march out of Wellington Barracks for the first time, I'm fairly sure everyone will grow a good eight to 10 inches," said Lt Cdr Elliott earlier.

"It's great to do this ceremonial piece and have the Royal Navy back in the public eye, as well as to act as a capstone to the year of the Royal Navy. We couldn't ask for anything better."

The sailors will also be performing Royal Duties at St James's Palace, Windsor Castle and the Tower of London.