The Government said it remains "deeply concerned" by the "unacceptable" seizure of a British-flagged oil tanker by Iranian authorities in the Persian Gulf.
The Stena Impero, which is registered in the UK, was seized by the Iranian Revolutionary Guard in the Strait of Hormuz for "violating international maritime rules", according to the semi-official Fars news agency.
Stena Bulk, which owns the Stena Impero, said the ship was in "full compliance with all navigation and international regulations".
A second oil tanker, the Liberian-flagged Mesdar, which is managed by Norbulk Shipping UK, veered off course towards the Iranian coast after it was boarded by armed guards at around 5.30pm on Friday.
The Mesdar's Glasgow-based operator said communication had since been re-established with the ship and the crew were unharmed.
The Government's emergency committee Cobra met on Friday night to discuss the situation.
"We remain deeply concerned about Iran's unacceptable actions which represent a clear challenge to international freedom of navigation," a Government spokesman said.
UK vessels have been advised to "stay out of the area" of the Strait of Hormuz for an "interim period", the spokesman said, adding: "As the Foreign Secretary has said, our response will be considered and robust and there will be serious consequences if the situation is not resolved."
Earlier Foreign Secretary Jeremy Hunt, who attended the Cobra meeting, warned there would be "serious consequences" if the situation was not resolved quickly.
Mr Hunt said he understood that there were no British citizens on board either ship.
"We will respond in a way that is considered but robust and we are absolutely clear that if this situation is not resolved quickly there will be serious consequences," he said.
Asked if he could rule out military intervention, Mr Hunt said: "We're not looking at military options, we're looking at a diplomatic way to resolve the situation, but we are very clear that it must be resolved.
"Freedom of navigation in the Gulf is absolutely essential. If that freedom of navigation is restricted, Iran is the biggest loser and so it is in their interest to resolve this situation as quickly as possible and we will do everything we can to do that."
He said the Stena Impero was surrounded by four vessels and a helicopter, and was heading into Iranian waters.
The second ship, the Mesdar, was surrounded by 10 speedboats, he said.
He said he had spoken to US secretary of state Mike Pompeo about the situation and had tried to speak to Iranian foreign minister Mohammad Javad Zarif, but he was on a plane.
A statement from Stena Bulk said ship manager Northern Marine Management had lost contact with the crew of 23 after "unidentified small crafts and a helicopter" approached the vessel at about 4pm on Friday.
The company said the tanker was in international waters at the time but appeared to be heading north towards Iran.
Erik Hanell, president and chief executive of Stena Bulk, said: "There are 23 seafarers onboard of Indian, Russian, Latvian and Filipino nationality.
"There have been no reported injuries and the safety and welfare of our crew remains our primary focus. We are in close contact with both the UK and Swedish government authorities to resolve this situation and we are liaising closely with our seafarers' families."
US president Donald Trump said America would be "working with the UK".
He told reporters: "We will talk to the UK and we have no written agreement but we have an agreement.
"They've been a very great ally of ours.
"So we heard about it, we heard it was one, we heard it was two, and we will be working with the UK."
The incident follows on from recent heightened tensions in the Gulf involving Iran, the US and UK.
Last week, the Royal Navy warship frigate HMS Montrose drove off three Iranian vessels which tried to stop the commercial ship British Heritage as it sailed through the Strait of Hormuz.
Fears were raised that the Iranian authorities were trying to seize a UK ship in retaliation for the detention of the Grace 1 tanker.
The Iranian ship was detained off the coast of Gibraltar on July 4 after it was suspected of violating EU sanctions by carrying a cargo of crude oil destined for Syria.
The ship's captain, chief officer and two second officers were arrested and bailed and an investigation is ongoing.
Iran's supreme leader Ayatollah Ali Khamenei called the tanker's seizure an act of "piracy" on Tuesday and warned the UK to expect a response.
Mr Hunt offered to help release Grace 1 if Iran guaranteed it would not breach sanctions imposed on Bashar Assad's regime.
European allies to the US have been urged to take a tougher stance on Iran after Mr Trump withdrew from a nuclear deal with Tehran.
On Thursday, Mr Trump said a US warship shot down an Iranian drone in the Strait of Hormuz - something denied by Iranian military officials.
Last month, Mr Trump said he had made a last-minute decision to call off air strikes in retaliation for the shooting down by Iran of an unmanned US drone.