The British military said two armed Iranian Revolutionary Guard vessels opened fire on a tanker passing through the Strait of Hormuz after Iran announced it had reimposed restrictions on the waterway.
The UK's Merchant Marine Operations Centre said the ship and crew were safe, without giving details about the vessel or its destination, the AP reported.
During the seven-week war, Iran has prevented the passage of ships, except those it has authorized itself.
On Thursday, Iran had announced the temporary reopening of the Strait of Hormuz following a separate 10-day ceasefire agreement brokered by the US between Israel and Lebanon.
But on Saturday, Iran's Armed Forces Command said transit through the strait had returned to a state of strict Iranian military control, citing what it described as repeated US violations and acts of "piracy."