The British-flagged Stena Impero tanker that was seized by Iran in July has left the port of Bandar Abbas and is making its way to Dubai after more than two months in captivity.

“The vessel has left the port of Bandar Abbas and is transiting to Dubai for the crew to disembark and receive medical checks and debriefing,” said a statement from Stena Bulk, the Swedish company that owns the vessel. At normal speed it would reach Dubai within half a day.

The Stena Impero was detained by Iran’s Revolutionary Guards in the strait of Hormuz waterway for alleged marine violations two weeks after Britain seized an Iranian tanker off the territory of Gibraltar. That vessel was released in August.

MarineTraffic.com, citing satellite data, showed the Stena Impero just outside the Iranian port of Bandar Abbas on Friday morning, where it had been held since being seized on 19 July. There was no immediate comment from Iranian authorities.

There had been significant confusion over when the ship would be allowed to leave the port after Iranian authorities said on Monday that they had closed legal proceedings against the vessel. It stayed anchored in the port for two days without explanation.

A spokesman for Stena Bulk said on Wednesday the company was unaware of the reasons behind the delay of the ship’s departure and had been out of contact with the vessel’s master for more than a week.

Iran’s foreign ministry had said the same day that a lifting of the detention order had been finalised, but that an investigation into the vessel was ongoing.

Stena Bulk later said it was not in negotiations with Iran and was not aware of any formal charges against the crew or the company.

Iran had earlier freed seven of the ship’s 23 crew members.

Iran’s seizure of the Stena Impero had raised tensions in the region following attacks in May and June on other merchant vessels in Gulf waters, which Washington blamed on Tehran. Iran has denied responsibility.

Relations between the US and Iran have become more strained since Washington withdrew last year from a global pact to rein in Tehran’s nuclear programme and imposed sanctions on the country aimed at shutting down Iranian oil exports.

Reuters and Associated Press contributed to this report