Iran has said that it will release the crew of a South Korean chemical tanker that was seized nearly a month ago.

The country's foreign ministry spokesman, Saeed Khatibzadeh, said on Tuesday that the seafarers working aboard 17,400-dwt Hankuk Chemi (built 2020) are now free to return home, according to state-run Mehr News Agency.

"Following the request of the South Korean government and the assistance of the [Iranian] judiciary within the framework of judicial regulations, the crew of the South Korean ship, which was detained on charges of environmental pollution in the [Middle East] Gulf, have received the permission of the Islamic Republic of Iran received to leave the country in a humanitarian move," Khatibzadeh said.

He added that Iranian courts will continue investigating the captain and the ship's actions. It is unclear if the captain is included among the released crew members.

The DM Shipping-owned, Taikun Shipping-operated Hankuk Chemi was seized on 4 January over pollution allegations.

The pollution was widely considered pretence for retaliation over South Korea freezing billions in Iranian funds in South Korean banks.

Previous reports said the funds totalled $7bn, but the Mehr story said it was $8.5bn held in two banks.

The banks were said to have frozen the funds over concerns they could be subject to harsh US sanctions.

The crew's release comes after high-level talks involving South Korea first vice minister of foreign affairs Choi Jong-Kun through January.

Mehr said Khatibzadeh referenced a phone called between Jong-Kun and Iranian Deputy Foreign Minister for Political Affairs Abbas Araghchi in which the Tehran official stressed the need for the banks to release the funds.

Araghchi also implored South Korea not to bow to US pressure.

"For about two and a half years, South Korean banks have illegally frozen Iran’s foreign exchange assets over what they describe as fear of US sanctions. This measure, which is only due to submission to US extortionist policies, is not acceptable," he said last month.