Well-wishers have lined the harbour walls to welcome home the Royal Navy aircraft carrier HMS Prince of Wales as it returns from exercises in its role as the Nato command ship.

The 65,000-tonne warship sailed into Portsmouth Naval Base, Hampshire, on Saturday, having operated alongside Spain’s aircraft carrier in the Gulf of Cadiz.

Prince of Wales aircraft carrierHMS Prince of Wales returns to Portsmouth Naval Base (Ben Mitchell/PA)

A navy spokesman said: “The Nato task force – made up of 20 ships from six nations – was assembled to show the alliance’s commitment to the region’s prosperity and security ahead of the Nato Madrid summit.

“HMS Prince of Wales was involved in her role as Nato’s command ship, which means she is ready to deploy quickly in response to crises as part of the alliance’s response force.”

The naval exercises began with a royal salute from the Spanish fleet to King Felipe VI of Spain, who was aboard aircraft carrier Juan Carlos I.

Prince of Wales aircraft carrierThe crew of the HMS Prince of Wales as it sails into Portsmouth (Ben MItchell/PA)

Captain Richard Hewitt, commanding officer of HMS Prince of Wales, said: “Being able to formally recognise the Spanish royal family, saluting King Filipe VI from the bridge of HMS Prince of Wales, was a real honour.

“Coming only a few weeks after our celebrations for our Queen’s Platinum Jubilee, operating alongside the Spanish flagship represents another milestone in the operational journey of HMS Prince of Wales.”