The Royal Navy has been deployed to protect British ships in the Gulf amid escalating tensions over Donald Trump’s drone killing of Iranian commander Qassem Soleimani.

Ben Wallace, the defence secretary, said he has ordered two British warships to return to the Strait of Hormuz imminently to guide British-flagged vessels through the key oil passage.

He said the government “will take all necessary steps to protect our ships and citizens at this time” as Type 23 frigate HMS Montrose and Type 45 destroyer HMS Defender were deployed on Saturday.

The move came as the Foreign Office strengthened its travel warnings across the region as fears of all-out war heightened.

Tehran has vowed harsh retaliation after US president Donald Trump authorised the killing of General Qassem Soleimani in an airstrike on Thursday.

US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Show all 35 1 /35 US airstrike kills Iran's Qassem Soleimani: Fallout in pictures US airstrike kills Iran's Qassem Soleimani: Fallout in pictures This photo released by the Iraqi Prime Minister Press Office shows a burning vehicle at the Baghdad International Airport following an airstrike in Baghdad, Iraq, early Friday 3 January AP US airstrike kills Iran's Qassem Soleimani: Fallout in pictures The wreckage of the car in which general Soleimani was travelling when a targeted US airstrike struck outside Baghdad International Airport on 3 January Ahmad Al Mukhtar via Reuters US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Demonstrators burn the US and British flags during a protest in Tehran after general Soleimani was killed in a targeted airstrike by American forces Reuters US airstrike kills Iran's Qassem Soleimani: Fallout in pictures A burning vehicle at the Baghdad International Airport following an airstrike. The Pentagon said Thursday that the US military has killed general Qassem Soleimani, the head of Iran's elite Quds Force, at the direction of Donald Trump AP US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Protesters burn Israeli and US flags as thousands of Iranians take to the streets to mourn the death of general Soleimani at the hands of America EPA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Supporters of Donald Trump pray at an 'Evangelicals for Trump' campaign event held on the day following the killing of general Soleimani. At the event, the president praised the "flawless strike that eliminated the terrorist ringleader" AFP via Getty US airstrike kills Iran's Qassem Soleimani: Fallout in pictures A huge procession of mourners gather in Baghdad for the funeral of general Soleimani on 4 January AP US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Thousands of Iranians take to the streets to mourn the death of Soleimani during an anti-US demonstration to condemn the killing of Soleimani, after Friday prayers in Tehran, Iran EPA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Iraqis perform a mourning prayer for slain major general Qasem Soleimani of the Iranian Revolutionary Guards at the Great Mosque of Kufa AFP via Getty US airstrike kills Iran's Qassem Soleimani: Fallout in pictures A billboard reading 'Death to America and Israel', installed by Iran-backed shiite armed groups at a street in Jadriyah district in Baghdad, Iraq EPA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures A handout picture provided by the office of Iran's supreme leader Ayatollah Ali Khamenei shows him visiting the family of Soleiman KHAMENEI.IR/AFP via Getty US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Thousands of Iranians take to the streets in Tehran EPA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Pakistani Shiite Muslims burn a mock of a US flag as they hold pictures of General Qasem Soleimani during a protest against the USA, outside the US Consulate in Lahore, Pakistan EPA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Iran's Ambassador to Lebanon Mohammed Jalal Feiruznia, looks to a portrait of Soleimani, as he receives condolences at the Iranian embassy, in Beirut, Lebanon AP US airstrike kills Iran's Qassem Soleimani: Fallout in pictures People make their way on the street while a screen on the wall of a cinema shows a portrait Soleimani in Tehran AP US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Aziz Asmar, one of two Syrian painters who completed a mural following the killing of Iranian Revolutionary Guards commander Qasem Soleimani poses next to his creation in the rebel-held Syrian town of Dana in the northwestern province of Idlib AFP via Getty US airstrike kills Iran's Qassem Soleimani: Fallout in pictures A demonstration in Tehran AFP via Getty US airstrike kills Iran's Qassem Soleimani: Fallout in pictures An anti-US demonstration to condemn the killing of Soleimani, after Friday prayers in Tehran EPA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Mujtaba al-Husseini, the representative of Iran's supreme leader Ayatollah Ali Khamenei, delivers a speech in the holy shrine city of Najaf AFP via Getty US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Pakistani Shiite Muslims burn a mock of a US and Israeli flags as they hold pictures of General Qasem Soleimani during a protest against the USA, outside the US Consulate in Lahore, Pakistan EPA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Protesters demonstrate in Tehran AP US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Pakistani Shi'ite Muslims hold pictures of General Qasem Soleimani during a protest against the USA, in Peshawar, Pakistan EPA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Protesters, holding a photograph of the leader of the People's Mujahedin of Iran Massoud Rajavi, outside Downing Street in London PA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Protesters burn a US flag in Tehran AP US airstrike kills Iran's Qassem Soleimani: Fallout in pictures A Syrian man offers sweets to children to mark the killing AFP via Getty US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Iranian worshippers attend a mourning prayer for Soleimani in Iran's capital Tehran AFP via Getty US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Kashmiri Shiite Muslims shout anti American and anti Israel slogans during a protest AP US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Iranian worshipers chant slogans during Friday prayers Reuters US airstrike kills Iran's Qassem Soleimani: Fallout in pictures A protest against the USA, in Islamabad, Pakistan EPA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Iranians burn a US flag in Tehran EPA US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Supporters of the National Council of Resistance of Iran in Germany (NWRI) protest outside Iran's embassy in Berlin, Germany Reuters US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Supporters of the National Council of Resistance of Iran in Germany (NWRI) protest outside Iran's embassy in Berlin Reuters US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Iranian worshippers in Tehran AFP via Getty US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Vehicles of the United Nations Interim Forces in Lebanon (UNIFIL) patrol a road in the southern Lebanese town of Kfar Kila near the border with Israel. Following morning's killing of Major General Qasem Soleimani, Lebanon's Iran-backed Hezbollah movement called for the missile strike by Israel's closest ally, to be avenged AFP via Getty US airstrike kills Iran's Qassem Soleimani: Fallout in pictures Iranian women take to the streets in Tehran EPA

The US has also dispatched 3,000 extra troops to Kuwait.

Thousands of supporters chanted “death to America” as they marched in a funeral procession through Baghdad.

Mr Wallace urged “all parties” to de-escalate the situation – although he said the US was “entitled to defend itself”.

After speaking to his US counterpart Mark Esper, Mr Wallace said American forces have been “repeatedly attacked by Iranian-backed militia” in Iraq during “the last few months”.

He said: “General Soleimani has been at the heart of the use of proxies to undermine neighbouring sovereign nations and target Iran’s enemies.

British warship HMS Montrose pictured docked in the Cypriot port of Limassol in February 2014. (STR/AFP via Getty)

“Under international law the United States is entitled to defend itself against those posing an imminent threat to their citizens.”

The practice of escorting ships in the Strait of Hormuz was stood down in November after being used during the fall-out from the seizure of the British-flagged Stena Impero tanker by Iran in July.

The difference this time is the fact UK ships now have a choice to navigate the waters without an escort at their own risk.

The Foreign Office has advised citizens not to travel to Iraq, apart from essential travel to its Kurdistan region, while all but essential travel to Iran is warned against.

Alerts regarding other Middle East nations are also being increased, with calls to “remain vigilant” in countries including Afghanistan, Israel, Lebanon, Saudi Arabia and the United Arab Emirates.

Dominic Raab, the foreign secretary, is set to meet with his French and German counterparts over the coming days before flying to Washington DC to meet US secretary of state Mike Pompeo on Thursday in a bid to reduce the tensions.

Labour’s John McDonnell condemned the government’s response to “this act of aggression, this escalation towards war” when he joined protesters outside Downing Street.

The shadow chancellor told the crowd with the Stop the War Coalition: “It was acts like this that led us to the catastrophic war in Iraq.”

Prime minister Boris Johnson has been celebrating the new year with his girlfriend Carrie Symonds on the private Caribbean island of Mustique and has not commented on the general’s killing.

He is expected to return to the UK early on Sunday.