Iran has warned it will protect its waters after the UK set out plans to put together a European maritime force to defend shipping in the Strait of Hormuz.

Tehran’s foreign minister Mohammad Javad Zarif accused the British of “piracy” and insisted that Iran was responsible for “security and freedom of navigation” in the Gulf.

The issue will be one of the first diplomatic challenges confronting incoming prime minister Boris Johnson.

In a message congratulating the new Tory leader, Mr Zarif said: “Iran does not seek confrontation.

“But we have 1,500 miles of Persian Gulf coastline. These are our waters and we will protect them.”

He repeated Tehran’s claim that the British had committed “piracy” over the seizure of the Grace 1 supertanker by the authorities in Gibraltar on suspicion that it was transporting oil to Syria in breach of European Union sanctions.

And he accused the UK of carrying out the policies of the US hawks led by John Bolton which Tehran has dubbed the B-team.

He said: “We are responsible for security and freedom of navigation in the Persian Gulf.

“That is our lifeline and it is much, much better for the United Kingdom not to be engaged in implementing the ploys of the B-team.

“The B-team is losing ground in the United States and now they are turning their attention to the United Kingdom.

“I guess the same policies that failed in the US will fail in the United Kingdom.”

The UK has also accused Iran of an “act of state piracy” over the seizure of the British-flagged Stena Impero by Iranian Revolutionary Guards on Friday.

Foreign Secretary Jeremy Hunt told MPs on Monday that the proposed new European mission would focus on ensuring free navigation through one of the world’s most important waterways, which carries a fifth of the world’s oil and a quarter of its liquefied natural gas flow.

It would seek to “complement” US proposals to protect shipping in the region, although it would not form part of the American “maximum pressure” policy on Tehran as the UK continued to support the Iran nuclear deal which the US has repudiated.

“It is with a heavy heart that we are announcing this increased international presence in the Gulf, because the focus of our diplomacy has been on de-escalating tensions in the hope that such changes would not be necessary,” Mr Hunt said.

He added: “If Iran continues on this dangerous path, they must accept the price will be a larger Western military presence in the waters along their coastline, not because we wish to increase tensions but simply because freedom of navigation is a principle which Britain and its allies will always defend.”