Speaking after a foreign ministry meeting, President Rouhani lashed out and threatened that Tehran could not guarantee security in the Strait of Hormuz unless Iran was permitted to freely move around Gibraltar.

The country’s defence minister later unveiled three precision-guided missiles, saying they show the country is ready to defend itself in the face of “viciousness and conspiracies”.

Last month British marines detained an Iranian tanker near the Strait of Gibraltar, which the UK accused of smuggling oil and breaking EU sanctions, triggering a bitter diplomatic spat.

Iran’s elite revolutionary guards later intercepted a British-flagged tanker, the Stena Impero, which remains under their control.

On Monday, Whitehall officials said that two royal naval warships deployed to the area will now join a US-led mission heavily criticised by Tehran. It aims to accompany commercial vessels through the waterway, which carries 20 per cent of the world’s oil supplies.

In photos: British-flagged tanker seized by Iran Show all 13 1 /13 In photos: British-flagged tanker seized by Iran In photos: British-flagged tanker seized by Iran A speedboat of Iran's Revolutionary Guard moving around the British-flagged oil tanker Stena Impero Tasnim News Agency/AP In photos: British-flagged tanker seized by Iran Crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran A satellite image of the Iranian port city of Bandar Abbas reveals the presence of the seized British oil tanker, the Stena Impero on July 22 Maxar Technologies/Reuters In photos: British-flagged tanker seized by Iran Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran Iranian Revolutionary Guards patrolling around the captured British-flagged tanker Stena Impero as it's anchored off the Iranian port city of Bandar Abbas AFP/Getty In photos: British-flagged tanker seized by Iran epa07733612 A handout photo made available by Iranian state-run IRIB News Agency on 22 July 2019 shows crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz on 19 July 2019. Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July 2019. EPA/IRIB NEWS AGENCY / HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES IRIB NEWS AGENCY / HANDOUT EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran A satellite image of the Iranian port city of Bandar Abbas reveals the presence of the seized British oil tanker, the Stena Impero on July 22 Maxar Technologies/Reuters In photos: British-flagged tanker seized by Iran A speedboat of the Iran's Revolutionary Guard moves around a British-flagged oil tanker Stena Impero AP In photos: British-flagged tanker seized by Iran epa07733614 A handout photo made available by Iranian state-run IRIB News Agency on 22 July 2019 shows crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz on 19 July 2019. Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July 2019. EPA/IRIB NEWS AGENCY / HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES IRIB NEWS AGENCY / HANDOUT EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran In this photo released by state-run IRIB News Agency, which aired on Monday, July 22, 2019, shows cooks in the galley of the British-flagged tanker Stena Impero that was seized by Tehran in the Strait of Hormuz on Friday. The Associated Press cannot independently verify the condition of the crew members, but in the video they looked to be in good health and it didn't appear as though they were being filmed under duress. (IRIB News Agency via AP) AP In photos: British-flagged tanker seized by Iran epa07733619 A handout photo made available by Iranian state-run IRIB News Agency on 22 July 2019 shows crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz on 19 July 2019. Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July 2019. EPA/IRIB NEWS AGENCY / HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES IRIB NEWS AGENCY / HANDOUT EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran epa07733613 A handout photo made available by Iranian state-run IRIB News Agency on 22 July 2019 shows crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz on 19 July 2019. Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July 2019. EPA/IRIB NEWS AGENCY / HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES IRIB NEWS AGENCY / HANDOUT EPA/IRIB News Agency In photos: British-flagged tanker seized by Iran epa07733616 A handout photo made available by Iranian state-run IRIB News Agency on 22 July 2019 shows crew members of the British-flagged tanker Stena Impero, that was seized by Iran in the Strait of Hormuz on 19 July 2019. Iranian Revolutionary Guard Corps (IRGC) claims to have seized Stena Impero at the Strait of Hormuz with 23 crew on board on 20 July 2019. EPA/IRIB NEWS AGENCY / HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES IRIB NEWS AGENCY / HANDOUT EPA/IRIB News Agency

As tensions appeared to near breaking point, Mr Rouhani issued a veiled warning against the new initiative on Tuesday morning, saying that “war with Iran is the mother of all wars”.

“Security for security ... A strait for a strait. It can’t be that the Strait of Hormuz is free for you and the Strait of Gibraltar is not free for us,” Mr Rouhani said.

“If you want security, if your soldiers want security in the region, [then agree to] security for security. You cannot harm our security and then expect your own security,” he added.

Tensions between Iran and the west have soared since last summer when President Donald Trump unilaterally withdrew from a 2015 deal between the US, Iran, China, France, the UK and Germany, which had curbed the Islamic republic’s nuclear programme in exchange for the easing of economic sanctions.

Mr Trump’s campaign of “maximum pressure” sanctions prompted Iran to hit back by decreasing some of its commitments under the deal.

But the situation threatened to tip into a regional conflict last month when ships in and along the Strait of Hormuz were attacked, drones were shot down and tankers seized.

At the height of the crisis, Mr Trump said he had called off airstrikes against Iran with just minutes to spare after the Islamic republic’s forces shot down a US drone.

Since then Washington has urged its allies to form a joint taskforce to patrol the Gulf.

On Monday Britain broke with an original plan to form a European-only initiative, becoming the first country to heed the call. Iran’s foreign minister Mohammad Javad Zarif had earlier taunted Washington, saying its allies were too “ashamed” to join the mission.

Iran's Revolutionary Guards publish purported exchange with British warship

Germany has publicly rejected calls to participate. France, which has a frigate in the area, has yet to commit.

In another sign of posturing, Iranian defence minister Brigadier-General Amir Hatami on Tuesday unveiled the launch of three new air-to-air missiles called the “Yasin”, “Balaban” and a new series of the “Ghaem”. He hailed it as “another significant achievement” for the country.