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".
Stena Bulk later said it understood its "long-standing request to remove non-essential personnel" from the vessel was now being acted upon by the Iranian government and that arrangements were being made for their release.
Erik Hanell, the company's president and CEO, said: "We are very pleased that for seven crew members their ordeal may soon be over, and they may return to their families. However, we cautiously await official confirmation of their release date.
"We view this communication as a positive step on the way to the release of all the remaining crew, which has always been our primary concern and focus."
The remaining 16 crew members - 13 Indians, two Russians and one Filipino - will stay on board the Stena Impero to satisfy the vessel's Minimum Safe Manning Certificate (MSMC), which is issued by the flag state, according to Stena Bulk.
The chief executive of the UK Chamber of Shipping, Bob Sanguinetti, said: "We welcome the news that Iran has said it will free seven members of the Stena Impero crew, but this must be followed by the immediate release of the vessel and the rest of the crew."
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".