Iran seized the tanker Stena Impero in July, amid rising tensions in the Gulf which saw the Royal Navy call Portsmouth warships to the region.
On Monday, Iranian government spokesman Ali Rabiei told journalists that legal proceedings against the Stena Impero had ended.
He said: ‘Based on a friendly approach that allows forgiving mistakes, ground for freedom of the tanker has been paved and it can move.’
Man dies after dog attack at Hillson Drive recreation ground in Fareham - owner is arrested
Fareham dog attack: Shrine set up in memory of man who died - named locally as Wiggy Symes
Heartfelt tributes paid to Wiggy Symes who died after Fareham dog attack
Fareham dog walker and trainer Ian 'Wiggy' Symes thought to be killed by XL American Bully breed dog
Thunderstorms yellow weather warning issued over Waterlooville, Fareham and parts of Hampshire by Met Office with chance of 'heavy rain'
Its seizure came after authorities in Gibraltar seized an Iranian tanker carrying £104m in crude oil, on suspicion of it breaking European Union sanctions on Syria.
Gibraltar later released the tanker, then called the Grace 1, after it said Iran had promised the ship would not go to Syria.
Iranian Foreign Ministry spokesman Seyed Abbas Mousavi said on Wednesday that the vessel was close to being released.
‘Today, the procedures for discharging Stena Impro ship has been finalised with the foreign ministry's follow-ups and valuable co-operation between the judiciary and the Ports and Maritime Organisation Of Iran, but the case stays open to study some of its violations and damages to the environment,’ he tweeted.
Portsmouth-based warships HMS Duncan and HMS Kent were part of a fleet dispatched by the Royal Navy to tackle tensions in the Gulf.