An Iranian Revolutionary Guards commander has threatened to seize a British ship in retaliation for the capture of an Iranian supertanker off Gibraltar.

Key points: Authorities suspect the Iranian tanker was trying to take oil to Syria

Authorities suspect the Iranian tanker was trying to take oil to Syria The incident is the latest example of escalating tensions between Iran and the US and its allies

The incident is the latest example of escalating tensions between Iran and the US and its allies In 2007 Iran seized a Royal Navy vessel in the Persian Gulf and held its crew captive for a fortnight

British Royal Marines abseiled onto the Grace 1 supertanker off the coast of the British territory on Thursday and seized it. They also landed a helicopter on the moving vessel in pitch darkness.

The ship is suspected of trying to carry Iranian oil to Syria in violation of international sanctions.

"If Britain does not release the Iranian oil tanker, it is the authorities' duty to seize a British oil tanker," Iranian commander Mohsen Rezai said on Twitter.

But the UK Foreign Office dismissed suggestions that the raid constituted an act of piracy as "nonsense," the BBC reported.

The Gibraltar Government said the Grace 1's crew were being interviewed as witnesses, not criminal suspects, in an effort to establish the nature of their cargo and its ultimate destination.

The move escalates a confrontation between Iran and the West just weeks after the United States called off air strikes minutes before impact, and draws Washington's close ally Britain into a crisis in which European powers had striven to appear neutral.

A Royal Marines inflatable approaches the the Grace 1 supertanker. ( AP: Marcos Moreno )

Tehran summoned the British ambassador on Thursday to voice "its very strong objection to the illegal and unacceptable seizure" of its ship, a move that also eliminated doubt about the ownership of the vessel.

Foreign Ministry spokesman Abbas Mousavi said the crude oil cargo was from Iran.

The ship's paperwork had said the oil was from neighbouring Iraq, but tracking data suggested it had loaded at an Iranian port.

European countries have walked a careful line since last year when the United States ignored their pleas and pulled out of a pact between Iran and world powers that gave Tehran access to global trade in return for curbs on its nuclear program.

Latest in ongoing tensions

Mohsen Rezaei said Iran should consider seizing a British oil tanker. ( Office of the Iranian Supreme Leader, AP )

Over the past two months, Washington has sharply tightened sanctions against Tehran with the aim of halting its oil exports altogether. The moves have largely driven Iran from mainstream markets and forced it to find unconventional ways to sell crude.

The confrontation took on a military dimension in recent weeks, with Washington accusing Iran of attacking ships in the Gulf and Iran shooting down a US drone. President Donald Trump ordered, then cancelled, retaliatory strikes.

With nuclear diplomacy at the heart of the crisis, Iran announced this week it had amassed more fissile material than allowed under its deal, and said it would purify uranium to a higher degree than permitted from July 7.

The Grace 1 was impounded in the British territory on the southern tip of Spain after sailing the long way around Africa from the Middle East to the mouth of the Mediterranean, a route that demonstrates the unusual steps Iran appears to be taking to try to keep some exports flowing.

A Gibraltar spokesman said the 28-member crew, who have remained on board the supertanker, were mainly Indians with some Pakistanis and Ukrainians. Police and customs officials remained on board the vessel to carry out their investigation, but the Royal Marines were no longer present.

While the European Union has not followed the United States in imposing broad sanctions against Iran, it has had measures in place since 2011 that prohibit sales of oil to Syria.

Gibraltar said it had reasonable grounds to believe the Grace 1 was carrying crude oil to the Baniyas refinery in Syria. It made no mention of the ownership of the vessel or the origin of its cargo.

Shipping experts say it may have been avoiding the more direct route through the Suez Canal, where a big tanker would typically be required to unload part of its cargo into a pipeline to cross, potentially exposing it to seizure.

If officials in Gibraltar have not fully established the nature of the cargo or the final destination, they could in the coming days ask a court for permission to hold the vessel for longer.

The incident is not the first time the Royal Marines have been involved in a stand-off between the UK and Iran.

In 2007 marines were among 15 Royal Navy personnel who were seized from their patrol boat in the northern Persian Gulf and held for two weeks by Iranian forces.

Iran said they had strayed into its waters, but Britain said the crew were in Iraqi waters on a regular United Nations mission.

The group was released because then-prime minister Tony Blair sent a personal letter of apology over the incident, Iran said at the time.

Reuters/ABC