Iran has released a South Korea-flagged tanker three months after the elite Revolutionary Guards captured the vessel and raised tensions over US-led sanctions and Tehran’s nuclear programme.

Seoul said on Friday that the Hankuk Chemi departed Iran at 5.50am local time. “The captain and sailors are healthy and the ship and cargo are in good shape,” the foreign ministry said.

Iran’s foreign ministry said on Friday that an order to release the vessel followed an investigation into the Korean vessel’s alleged violation of its laws. It is not clear whether the vessel was freed as a result of negotiations under way in Vienna between Tehran and the remaining signatories of the 2015 nuclear deal from which Donald Trump pulled out in 2018.

Iran, the UK, France, Germany, Russia and China on Friday concluded four days of talks in the Austrian capital aimed at reviving the nuclear deal, known as the JCPOA. Negotiations will resume next week on managing Tehran’s nuclear activities and lifting sanctions imposed by the US, which was present in Vienna this week but did not talk directly to Iran.

Tehran has insisted that the South Korean vessel was seized because of alleged environmental violations. However, the incident was broadly viewed as an escalation of a dispute between South Korea and Iran over $7bn in Iranian cash held by South Korean banks.

The cash, held in commercial and central bank accounts in Seoul, was frozen after the Trump administration tightened sanctions on Iranian oil exports. Previously South Korea, which is home to one of the world’s biggest refining industries, imported as much as 15 per cent of its oil from Iran.

On Monday, Saeed Khatibzadeh, Iran’s foreign ministry spokesperson, said he expected the frozen money to be released during a visit to Tehran by South Korean officials in the near future, but added that progress had been “slow”.

Iran also said that the partial release of blocked money in overseas banks would not convince it to comply fully with the nuclear accord and roll back its enrichment activities. The Islamic Republic insists that the US should lift all sanctions imposed under the Trump administration before it recommits to the deal.

Abbas Araghchi, Iran’s deputy foreign minister, said on Thursday that nuclear deal talks were still “far from getting to a concrete conclusion but I can say we are progressing well”.

The Vienna talks — the most serious efforts to revive the nuclear accord since Trump pulled out — are likely to take time, diplomats have warned. Enrique Mora, the top EU official who chaired the JCPOA’s governing joint commission on Friday on behalf of the European bloc, said negotiations so far had been “constructive and results-oriented”.

The US state department has said it is “early days” and that talks are likely to be a slow process.“We didn’t go into these discussions this week expecting any immediate breakthroughs,” said Ned Price, state department spokesman, this week, adding: “We’ve always said this will be hard.”

During the negotiations over the ship seizure, South Korean officials argued that Iran’s money could be deployed through the Swiss Humanitarian Trade Arrangement, a funding channel established last year, or via direct assistance of food and medical supplies from South Korea. Iran also requested that Seoul used the funds to provide coronavirus vaccines.

Any such transactions would require approval by US Treasury officials, who police sanctions enforcement, according to people familiar with the discussions.

Woori Bank, one of the two South Korean commercial banks holding Iranian cash, and the South Korean central bank told the Financial Times on Friday that there had been no change regarding the Iranian deposits at their banks. The US state department could not immediately be reached for comment.

Additional reporting by Katrina Manson in Washington