British-flagged oil tanker was seized by Iran in July amid rising tensions in the Gulf.

Iran has said Stena Impero, a Swedish-owned tanker sailing under the British flag, is “free” to leave, more than two months after its seizure in the Strait of Hormuz sharply escalated tensions in one of the world’s most significant oil shipping lanes.

“The legal process has finished and based on that the conditions for letting the oil tanker go free have been fulfilled and the oil tanker can move,” Aliu Rabiei, government spokesman, said at a news conference on Monday.

It was not immediately clear when the Stena Impero would set sail.

The vessel, with 23 crew members on board, was seized on July 19 by Iran’s Revolutionary Guard Corps (IRGC) for allegedly violating international maritime rules. The United Kingdom and Stena Bulk, the company that owns the vessel, denied the allegations.

Herik Hannel, the chief executive of Stena Bulk, welcomed Monday’s news with caution.

“We hope it [the tanker] will be able to leave in a few hours, but we don’t want to take anything for granted. We want to make sure the ship sails out of Iranian territorial waters,” Hannel told Swedish television station SVT on Monday

The tanker’s capture came two weeks after British forces seized Iranian tanker Grace 1, now known as Adrian Darya 1, during an operation off Gibraltar over suspicions it was breaching European Union sanctions by transporting oil to Syria. Iran denied the allegations.

Despite an attempt by the United States to extend the detention of the Grace 1, the tanker was released in mid-August after Tehran formally assured that the vessel would not discharge its 2.1 million barrels of oil in Syria.

The seizure of both vessels came amid rising tensions in the Gulf between Iran and the United States.

Relations between the two countries have deteriorated since US President Donald Trump withdrew last year from the 2015 nuclear deal brokered between Iran and world powers to prevent Tehran from building nuclear weapons in exchange for sanctions relief.

Since then, the US administration has adopted a “maximum pressure” campaign aimed at crippling Iran’s oil exports, the country’s main source of income.

Monday’s announcement came on the same day UK Prime Minister Boris Johnson joined the US in accusing Iran of being “with a very high degree of probability” responsible for the attack on two major oil facilities in Saudi Arabia on September 14.

Speaking to reporters on Sunday on the plane to the United Nations General Assembly (UNGA) in New York, Johnson said the UK would consider taking part in a US-led military effort in Gulf.

“Clearly, if we are asked, either by the Saudis or by the Americans, to have a role then we will consider in what way we could be useful,” Johnson said.