With naval power Britain at the EU's exit door, Spain has gone on the offensive to be the next major player defending European shores.
Madrid's manoeuvring comes as the EU looks to deepen military cooperation to show unity in the wake of Brexit. The bloc's 27 remaining member states have already embarked on big plans to build what some see as the embryonic stage of an EU army.
Spain wants to be at the heart of that effort and has laid out the red carpet to assume command of Operation Atalanta, an anti-piracy mission along the Horn of Africa that Madrid says should be run from its Andalusian naval base in Rota.
But Spain is not just seeking the command centre, which is currently based in north London -- it also hopes to make Rota the EU's fifth operational headquarters, which Britain also holds.
"The Spanish offer is a headquarters for all types of missions," Admiral Antonio Martorell Lacave told AFP on board the Spanish amphibious assault ship 'Juan Carlos I'.
"With Brexit, the EU is left without a headquarters that is totally focused on Atalanta," he added.
Lacave is at the forefront of the MILEX18 military manoeuvres that took place at the base this week, during which Spain sought to convince the EU it was ready to swap places with Britain.
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.
Although the pirates released the crew after receiving a ransom, two of them were detained days later by European military officers.
To demonstrate capability, the military exercise staged the rescue of a fishing boat hijacked by a group of mock pirates, in a "maritime scenario more complicated than Atalanta that covers all aspects of planning an operation at a strategic level", said Martorell.
- Rota v Rome -
Under a hot Mediterranean sun, Spain's armed forces also showcased their greatest assets to convince top officials from across the EU.
Seen from the deck of 'Juan Carlos I', Chinook, Cougar and Tiger combat helicopters chuffed through the sky while Harrier jump jets lifted off.
The Spanish Defence Minister, Maria Dolores de Cospedal, defended Spain's ambitions for the Rota base.
"This would be an acknowledgement of Spain's commitment to the EU's security and defence policy," she said.
Spain participates in all of the EU's ongoing operations and missions, she underlined.
Operation Atalanta's headquarters will remain in Northwood until the UK leaves the EU in March 2019, a European Commission spokeswoman said. EU member states have until then to decide where the new command centre will be based.
Rota's bid for Atalanta is in association with France's historic naval base in Brest, on the tip of Brittany.
Rota would take over the command centre in Atalanta and Brest would win the Maritime Security Centre of the Horn of Africa (MSCHOA), also based in Northwood.
"The EU has become a global player in the Horn of Africa... We hope that our joint proposal will help to preserve this role," said Dolores de Cospedal and her French counterpart Florence Parly in a letter sent on 28 March to European diplomacy representative Federica Mogherini, a copy of which AFP obtained.
The Franco-Spanish project has a rival: the base in Rome, headquarters of Operation Sophia against smugglers of migrants in the central Mediterranean.
The Europeans must decide in the coming months whether or not to extend Operation Atalanta, whose mandate expires on December 31.
The number of attacks off the coast of Somalia in the Indian Ocean has fallen from a peak of 176 in 2011 to seven in 2017 and only one has been recorded since the beginning of 2018.
A Greek navy picture shows the interception by a Greek frigate of suspected Somali hijackers after a 2009 attempt to hijack a Norwegian cargo ship whose crew alerted the EU-led anti-piracy mission