The UK is preparing to deploy the Royal Navy to escort British-flagged commercial shipping through the Strait of Hormuz following the rapid escalation of tensions between Iran and the US.

The Ministry of Defence late on Saturday said the frigate HMS Montrose and HMS Defender, a destroyer, “will resume accompaniments of UK-flagged commercial vessels” in the strait.

Defence Secretary Ben Wallace said: “I have instructed preparations for HMS Montrose and HMS Defender to return to accompanying duties of Red Ensign shipping. The government will take all necessary steps to protect our ships and citizens at this time.”

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 US assassinated a powerful Iranian general in a drone strike in Iraq on Friday.

With Iran promising revenge, the killing of Qasem Soleimani, described as the second-most-powerful man in Iran, was the most dramatic escalation yet in spiralling tensions between Washington and Tehran and has prompted fears of a major conflagration in the Middle East.

In a statement on Twitter, Wallace said he spoke with his US counterpart Mark Esper on Friday.

Wallace said US forces had been “repeatedly attacked by Iranian-backed militia” in Iraq during “the last few months”.

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

“Under international law, the US is entitled to defend itself against those posing an imminent threat to its citizens.”

The British government on Saturday advised UK nationals to avoid travelling to Iraq and Iran.