Iranian authorities had detained the chemical tanker Hankuk Chemi and its multinational crew of 20 sailors in the Strait of Hormuz off Oman in January alleging it was polluting the waters with chemicals.
Iran has released a South Korean-flagged tanker it detained amid a dispute over billions in frozen oil funds, and the vessel's captain.
The Islamic Revolutionary Guard Corps seized the Hankuk Chemi and its multinational crew of 20 sailors in January, but South Korea's foreign ministry said in a statement that its detention had been lifted and "the ship departed safely today".
Ship-tracking websites showed the 147-metre-long (482-foot) vessel under way at 9 knots and heading for the Strait of Hormuz.
At the time of the seizure Tehran said the vessel was carrying 7,200 tons of "oil chemical products" and accused it of "repeated infringement of maritime environmental laws".
The move came after Tehran had urged Seoul to release billions of dollars of Iranian assets frozen in South Korea under US sanctions over its nuclear programme.
Tehran said in February that all the crew except the captain would be allowed to leave the country as a humanitarian gesture, but most of them remained on board to maintain the ship.
In the same month Seoul said the two had agreed on a way forward to release billions of dollars frozen from Iran's oil sales – but that it was awaiting US approval.
Iran was a key oil supplier to resource-poor South Korea until Washington's rules blocked the purchases, and Tehran says it has a total of $7 billion of funds blocked in Seoul.
READ MORE: Iran seizes South Korean-flagged tanker over ‘oil pollution’
Tehran agreed a multinational deal known as the JCPOA to curtail its nuclear programme in exchange for sanctions relief in 2015, but the accord was thrown into disarray three years later when the United States pulled out under then-president Donald Trump.
New US President Joe Biden has signalled his readiness to revive the accord and negotiators began meeting this week in Vienna to try to put it back on track.
But Secretary of State Antony Blinken last month signalled Washington would be opposed to releasing the funds blocked in South Korea unless the Islamic republic returned to full compliance with the nuclear agreement.
South Korea's foreign ministry made no mention of the money in its statement Friday.
But multiple South Korean media reports say Prime Minister Chung Sye-kyun will visit Tehran soon, without giving a date for the trip.
No one at the vessel's operator, DM shipping, was immediately available for comment.
Tehran has repeatedly denied that the seizure of the vessel was linked to the funds issue.
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 Guards 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 Gibra ltar 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.
READ MORE: Iran: South Korea holding our $7B funds 'hostage'