An official complaint by the Spanish government and the threat by an Iranian official to seize British ships is the latest twist in a strange affair, albeit one which has worrying ramifications at a time of rising tension, provoked by the seizure of an Iranian tanker off Gibraltar by Royal Marines.

“We are studying the circumstances and looking at how this affects our sovereignty,” declared Josep Borrell, the acting Spanish foreign minister, in Madrid.

The Spanish ministry of foreign affairs, however, had acknowledged earlier that stopping the ship was “in compliance with European Union sanctions” against Syria and the Spanish government had chosen, in the light of this, not to interfere.

So a Guardia Civil vessel stood by and watched as 30 marines from 42 Commando went into action in waters that Madrid claims as its own.

Although there have been charges by some Spanish politicians of British arrogance, the boarding of the tanker was, in fact, done with great reluctance. The constant message from London has been the need to maintain relations with Iran and try and save the nuclear deal Donald Trump is trying to sabotage.

The UK, along with France and Germany, have set up a payment mechanism for companies to keep trading with Iran in the face of extraterritorial US sanctions.

Tensions high as Trump approves new Iran sanctions: In pictures Show all 17 1 /17 Tensions high as Trump approves new Iran sanctions: In pictures Tensions high as Trump approves new Iran sanctions: In pictures Iran claims that in this picture released by Iran state TV, their surface-to-air missile is seen as it shoots down a US surveillance drone EPA Tensions high as Trump approves new Iran sanctions: In pictures This photo shows US RQ-4A Global Hawk unmanned surveillance drone. A drone of this model was shot down by Iran on Thursday 21 June AFP/Getty Tensions high as Trump approves new Iran sanctions: In pictures An oil tanker is on fire after it was subject to a suspected attacked at the Gulf of Oman on June 13. The US has blamed Iran for the attack Reuters Tensions high as Trump approves new Iran sanctions: In pictures Iran claims that in this picture released by Iran state TV, debris from the downed US drone is seen after it was recovered from Iranian waters AFP/Getty Tensions high as Trump approves new Iran sanctions: In pictures Smoke billows from an oil tanker after it was subject to a suspected attacked at the Gulf of Oman on June 13 Reuters Tensions high as Trump approves new Iran sanctions: In pictures US President Trump holds up a signed executive order to increase sanctions on Iran on 24 June AP Tensions high as Trump approves new Iran sanctions: In pictures Iranian President Rouhani stated in a televised address that the White House is "afflicted by mental retardation" following the increase in sanctions on 25 June EPA Tensions high as Trump approves new Iran sanctions: In pictures An Iranian navy boat tackles the fire on the Norwegian owned Front Altair oil tanker after it was hit in a suspected attack AFP/Getty Tensions high as Trump approves new Iran sanctions: In pictures Iran claims that in this picture released by Iran state TV, debris from the downed US drone is seen after it was recovered from Iranian waters AFP/Getty Tensions high as Trump approves new Iran sanctions: In pictures Smoke billows from an oil tanker after it was subject to a suspected attacked at the Gulf of Oman on June 13 Reuters Tensions high as Trump approves new Iran sanctions: In pictures A screenshot from a video released by the US Department of Defense that the US claims to show Iranian removing an unexploded limpet mine form the hull of the Japan-owned ship that was attacked in the Gulf of Oman on June 13 Getty Tensions high as Trump approves new Iran sanctions: In pictures An item reportedly found on the Japan-owned oil tanker that was attacked on June 13 in the Gulf of Oman AFP/Getty Tensions high as Trump approves new Iran sanctions: In pictures A handout photograph from the US Department of Defense shows a composite material that the US claim was left behind on the hull of the Japan-owned oil tanker following the removal of an unexploded limpet mine Getty Tensions high as Trump approves new Iran sanctions: In pictures A view from the cabin of an Iranian navy boat as it tackles the fire on the Norwegian owned Front Altair oil tanker after it was hit in a suspected attack EPA Tensions high as Trump approves new Iran sanctions: In pictures Release by US government A picture released by U.S. Central Command shows damage to the hull of the oil tanker Kokuka Courageous. The picture suggests that the ship is 'likely' to have been hit by a mine as the US Secretary of State Mike Pompeo moves to blame Iran for the suspected attack Reuters Tensions high as Trump approves new Iran sanctions: In pictures Smoke billows from an oil tanker after it was subject to a suspected attacked at the Gulf of Oman on June 13 Reuters Tensions high as Trump approves new Iran sanctions: In pictures Release by US government A picture released by U.S. Central Command shows damage to the hull of the oil tanker Kokuka Courageous. The pictures suggests that the ship is 'likely' to have been hit by a mine as the US Secretary of State Mike Pompeo moves to blame Iran for the suspected attack EPA

Britain has also sent a minister, Andrew Murrison from the Foreign and Commonwealth Office – the only European state to do so since attacks on oil tankers in the Gulf and the shooting down of an US drone by Iran ratcheted up the confrontation between the Trump administration and Tehran.

British, French and German officials are also aware that the American economic war on Iran, with the key aim choking off oil sales, the country’s main source of revenue, is having a highly damaging effect.

Exports are down to 200,000 barrels per day, with European estimates that Iran needs to sell between 600,000 to 700,000 barrels to keep the economy afloat.

The Spanish claim that the British took action at the request of the Americans; however, London insists it acted after receiving information from the Gibraltar government.

Fabian Picardo, Gibraltar’s chief minister, said: “We had reasonable grounds to believe that the vessel, the Grace 1, was acting in breach of EU sanctions against Syria. In fact, we have reason to believe that the Grace 1 was carrying its shipment of crude oil to the Banyas refinery in Syria.”

Data from Lloyd’s List, the specialist shipping website, showed that the tanker had begun its voyage in Iran and gone around Africa, before entering Gibraltarian territorial waters. It had not taken a far quicker route into the Mediterranean via the Suez Canal.

The distance from Iran to Syria sailing round Africa is about 23,300km, compared with just 6,600km via the Red Sea and Suez. One theory for the longer journey was that the tanker was too heavy to pass through the Suez Canal. That, however, would be the case only if it was fully loaded.

The tanker could still have avoided Gibraltar territorial waters and it remains unclear why this did not happen.

Lloyd’s List reported Grace 1 had “a complex ownership chain” and was controlled by Russian Titan Shipping, a subsidiary of TNC Gulf, a Dubai-based shipping company.

Executives connected with both companies hold Iranian university and technical qualifications, or list their names in Farsi. The crew, from India, Pakistan and Ukraine, are being questioned by authorities in Gibraltar.

Following the boarding of the ship, the Iranians summoned the British ambassador, Rob Macaire, to the ministry of foreign affairs in Tehran.

Despite strong protests about “illegal seizure” from the Iranian side, the meeting, The Independent understands, passed off better than expected.

Trump says war with Iran 'wouldn't last very long'

Since then Mohsen Rezaee, an advisor to Iran’s Supreme Leader Ayatollah Khamenei, has threatened that British oil tankers will be targeted for capture in retaliation. That, however, is seen as sabre rattling for internal consumption and it is thought unlikely that any such drastic moves are likely at the moment.

There are more worries about the effect of crowing from the Trump administration.

“Excellent news: UK has detained the supertanker Grace 1 laden with Iranian oil bound for Syria in violation of EU sanctions,” tweeted John Bolton, US national security adviser and advocate, formerly at least, of regime change in Tehran.

“America and our allies will continue to prevent regimes in Tehran and Damascus from profiting off this illicit trade”.