Iran released on Friday a South Korean ship and its captain detained since January after South Korea promised to try to secure the release of Iranian funds frozen in South Korean banks under US sanctions, a South Korean official said.
Iran seized the chemical tanker in the Strait of Hormuz and accused it of polluting the waters with chemicals.
The Hankuk Chemi had been travelling from a petrochemicals complex in Jubail, Saudi Arabia, to Fujairah in the United Arab Emirates when armed Revolutionary Guard troops stormed the vessel in January and forced the ship to change course and travel to Iran.
The issue triggered a diplomatic dispute after Iran demanded that South Korea release $7 billion in funds frozen in South Korean banks under US sanctions.
Iran agreed to free all of the ship's 20 crew members except for the captain in February, after a South Korean vice foreign minister visited Tehran.
A South Korean foreign ministry official told reporters that both sides had agreed the ship and the funds were not related issues and that South Korea promised to help get the money released.
"We have expressed our firm willingness to resolve the fund issue," said the official, who declined to be identified.
The South Korean ministry said the ship had left Iran after completing administrative procedures. It made no mention of the demand for the release of funds.
"The captain and sailors are in good health," the ministry said.
South Korea said the vessel did not cause any pollution. The ministry official said Iran dropped a plan to pursue criminal charges against the shipping company.
Iran has denied allegations that the seizure of the tanker and its crew constituted hostage-taking, saying it was South Korea that was holding Iranian funds hostage.
The freezing of the funds is linked to US sanctions that Washington reimposed on Tehran in 2018 after then-president Donald Trump withdrew from Iran's 2015 nuclear deal with world powers.
Under the Joe Biden administration, the US and Iran have begun indirect talks over a return to the accord.
The US has recently agreed to allow Iran to use the funds for non-military purposes and it has spent some on coronavirus vaccines secured via the global Covax initiative, the ministry official said, without giving a precise amount.
The Hankuk Chemi incident was the first seizure of a major vessel by Iran's naval forces in more than a year.
In July 2019, the Revolutionary Guard seized the British-flagged oil tanker Stena Impero in the Strait of Hormuz for allegedly ramming a fishing boat. They released it two months later.
At the time it was widely seen as a tit-for-tat move after authorities in the British overseas territory of Gibraltar detained an Iranian tanker and later released it, despite US objections.
Tehran denied the two cases were related.
The Guards seized at least six other ships in 2019 over alleged fuel smuggling.