The Spanish navy launched its assault on pirates who had seized a fishing boat called the Gavi.

A Spanish frigate and Spain's aircraft carrier, the Juan Carlos I, drew up alongside to halt their escape in an operation called Eunavfor Sarunia.

Student or retired? Then this plan is for you.

Dolores de Cospedal (r) with Mogherini in Brussels (Photo: consilium.europa.eu)

Two Spanish dinghies sped at the Gavi, one of them peppering its deck with machine gun fire, while the other one deployed a special forces team on board.

A helicopter air-dropped a second team on Gavi's deck, under cover of snipers from Juan Carlos I.

The encounter, on Monday (23 April), which took place a few miles out to sea from a Spanish military base in Rota, on Spain's Atlantic coast, was a naval exercise designed to show its military prowess.

The 'pirates' were meant to have come from the 'Heaven Revolutionary Group (HRG)', a radical force from 'Celego', a fictional country which resembled Somalia and which was at war with neighbouring 'Sarunia'.

The 'HRG fighters' surrendered to Spain, in its bid to show the EU that its navy can do the job currently being done for real out of the UK by Operation Atalanta, Europe's anti-piracy mission in the Horn of Africa region.

Monday's exercise was watched by more than 60 EU diplomats from the top deck of the Juan Carlos I.

The group, which flew in from Brussels on the day, included the 28 EU states' ambassadors from the political and security committee (PSC) in the EU Council, which is to take a decision on Atalanta's future next month.

The EU anti-piracy operation, the jewel in the crown of its six military missions, has been based out of England for the past 10 years.

But its command is likely to shift to another EU state as the UK leaves the bloc, the same way Britain lost the EU banking and medicines agencies to France and the Netherlands.

Spain's Atalanta bid comes amid rivalry from Italy, which already has command of Operation Sophia, an EU anti-migrant smuggler mission in the Mediterranean Sea.

The EU should merge Atalanta and Sophia at its base in Rome, Italy has said, but Spain wants to run Atalanta out of Rota, where it also inaugurated a new command HQ for future EU missions.

"Spain is the only EU nation that has contributed continuously, with both ships and airplanes since Atalanta was launched in December 2008," a Spanish spokeswoman, who narrated the HRG pirate assault as it happened, told EU diplomats on loudspeakers on the Juan Carlos I.

The Spanish navy also showed off vertical take-off and landing fighter jets and assault and air-lift helicopters.

It showed its humanitarian side by air-lifting a 'wounded pirate' from the Gavi to the Juan Carlos I for medical care.

"Impressive demonstration by Spain … Strong potential as operational HQ for current & future EU CSDP [common security and defence] missions," Sweden's EU security ambassador, Mikael Lindvall, said on the day on social media.

Spanish pride

"This mission [Atalanta] should be managed by an EU member state. I consider Spain to be an excellent candidate to host the Atalanta command HQ if the European Union authorities decide to transfer it [from the UK]," Spanish defence minister, Maria Dolores de Cospedal, told the diplomats in Rota.

To host the mission would be "a source of real pride for Spain, of the performance of its armed forces", she said.

Spain already had 852 men and women deployed "under the EU flag", representing 25 percent of personnel in EU overseas missions, she added.

"We are the first contributor to the common security and defence policy," the minister said.

The Juan Carlos I crew echoed her words.

"Everybody is hoping for it [the Atalanta command] because of the prestige," one sailor, who spoke off the record, told EUobserver. "It would probably mean more funds for the base [Rota] and more personnel. It might also mean we go out [to sea] more often," a second one said.

Pedro Serrano, a senior EU foreign service official, told diplomats that Spain's naval drill embodied EU military cooperation.

"We spend our time among papers and concepts in committee meetings, so it's refreshing to come and see what it's all about - operations," he said in Rota on Monday.

Atalanta was likely to have its mandate renewed over and over, he added. "Maritime security requires a permanent presence," he said.

EU push

Spain and Italy's rivalry on Atalanta comes amid a broader EU push for military integration in reaction to Brexit.

The EU foreign policy chief, Federica Mogherini, "wants to be moving this boat forward," Serrano said, referring to EU defence reforms.

The Spanish minister called Monday's exercise "a tangible example of Europe working together".

"This [military cooperation] is a pillar on which we are building the European project," Dolores de Cospedal said.

Esa Pulkkinen, a Finnish general who heads the European Union Military Staff (EUMS) in Brussels, recalled the first EU military projects under Javier Solana, a Spanish diplomat, who used to do Mogherini's job before the EU foreign service came into being in 2010.

The EUMS, which currently commands minor missions, such as posting EU military advisors overseas, is to become a command HQ for non-combat EU military operations as part of pre-Brexit reforms.

"I remember, in 2000, when we first started to build the EUMS. Javier Solana used to say that if we were to make any progress, we had to proceed at the speed of light," Pulkkinen said.

"This is what I have seen happen in the past two years. Yesterday's dream is today's reality," he said.

Mumbai mission

The Juan Carlos I prepared to sail to Kuwait as the ambassadors and military attaches went back to Brussels on Monday.

The eight-year old aircraft carrier is to take part in Western peacekeeping operations in Iraq for the next two months in its first deployment in a real conflict.

The €500m vessel will also sail to Mumbai, in India, to promote Spanish arms exports, in a nod to the commercial benefits for Spain if it were to win the bid to host Atalanta - the EU's "pride" and "prestige" operation - in the Brexit reshuffle.

"We're going to Mumbai to promote Spanish industry," a Juan Carlos I sailor said.