Spain on Friday took over from Britain command of a European Union maritime mission that combats piracy off the coast of Somalia as Britain's planned departure from the bloc nears.
Spanish vice-admiral Antonio Martorell relieved British major general Charlie Strickland as commander of the so-called "Operation Atalanta" during a solemn ceremony held at the Rota naval base in southern Spain, where US troop are also stationed.
The ceremony was held on the day Britain was originally set to leave the European Union. British lawmakers voted down an unpopular divorce deal for a third time on Friday.
"It is honestly a sad day for the UK ... but it is an exciting day for Spain," Strickland said during the ceremony.
"Atalanta is so much more than ships in the Indian Ocean and aircraft in the skies. Atalanta is a sophisticated multilayered operation using hard and soft power to continue to suppress piracy and to take a powerful role in the broader security architecture of this key region of the world."
The European Council announced in July that it would transfer the headquarters of Atalanta which employs 101 people from Northwood outside of London to Rota.
The operation's headquarters is just one of the European institutions which Britain is losing as a result of its impending EU exit.
The European Medicines Agency moved to Amsterdam while the European Banking Authority was relocated to Paris.
While Spain took over Atalanta's command centre, France's historic naval base in Brest on the tip of Brittany won the Maritime Security Centre of Africa which was also based in Northwood.
The EU launched Atalanta in 2008 to fight brazen acts of piracy off the coast of Somalia, including the spectacular hijacking of a Spanish tuna boat in 2009.
The number of attacks off the coast of Somalia in the Indian Ocean has fallen from a peak of 176 in 2011 to just two in 2018, according to Atalanta.
The European Union has extended Operation Atalanta to 2020 and gave it a budget of €12 million for 2019 and 2020.
Italy had also sought to win the headquarters of Atalanta. It had proposed that it be moved to a base in Rome which already holds the headquarters of Operation Sophia against smugglers of migrants in the central Mediterranean.