Iran says it will free on humanitarian grounds seven of the 23 crew members of a Swedish-owned, British-flagged tanker seized in the Strait of Hormuz in July.
The sailors – five Indians, one Latvian and one Russian – had already left the Stena Impero, a foreign ministry spokesman told state television.
Iran accuses the vessel of “violating international maritime rules”.
The seizure came two weeks after an Iranian tanker was held off Gibraltar with the help of the Royal Marines.
That ship, now called the Adrian Darya 1, was suspected of violating EU sanctions on Syria but it was released by Gibraltar on 15 August.
The Stena Impero was passing through international waters in the Strait of Hormuz, a narrow waterway that connects the Gulf and the Indian Ocean, on 19 July when it was detained by Iran’s Islamic Revolution Guard Corps.
Video footage showed troops descending from a helicopter on to the deck.
The UK says a Royal Navy frigate deployed in the Gulf tried to come to the tanker’s aid and warned the Iranians by radio that their actions were illegal, but that it was unable to reach the scene in time.
The Stena Impero was brought to the Iranian port of Bandar Abbas, where it remains at anchor.
Its Swedish operator, Stena Bulk, said last month it had been able to maintain limited communication with the crew and that they remained in good health “considering the circumstances”. But it expressed concern about their welfare.
On Wednesday, Iranian foreign ministry spokesman Abbas Mousavi told state TV that the ship’s captain had selected seven members of its crew to be released.
“They have left the vessel and the final procedures are under way to send them back to their countries,” he said, adding that the decision had been made in line with Iran’s “humanitarian policies”.
Mr Mousavi stressed the Iranian authorities had “no problem with the crew and the captain” and at issue were “violations that the vessel committed”.
He did not say what would happen to the remaining 13 Indian, two Russian and one Filipino crew members.
Stena Bulk has said it is not aware of any evidence that the Stena Impero breached any maritime rules or regulations, and that it stands behind the professionalism and conduct of its crew members.
The UK has said Iran had no right to obstruct the vessel’s passage and accused it of an “act of state piracy”.