Gibraltar has released the Iranian supertanker Grace 1, the territory’s chief minister has told Sky News.
Fabian Picardo said an investigation found the cargo was being sent to Syria, which put it in breach of EU sanctions.
But he added Tehran had promised it would no longer unload the cargo at its intended destination, meaning he could not detain the ship for “one more moment”.
The tanker was seized by Gibraltarian authorities and Royal Marines in the Mediterranean last month over suspicion it was bound for Syria.
Mr Picardo told Sky News that Iran had “said on its letterhead that it is not going to provide the Cargo of Grace 1 to an EU-sanctioned entity”.
He argued that Tehran was “not going to be well-regarded by the international community” if it broke its promise.
Gibraltar dealt “very respectfully” with the delicate diplomatic situation, Mr Picardo said, insisting: “We’re satisfied that our rules are not going to be broken.”
He added he had held a “positive and constructive” meeting with Iranian officials in London in an attempt to de-escalate tensions.
Iran’s ambassador to London, Hamid Baeidinejad, said the Grace 1 tanker will leave Gibraltar soon.
It comes after the US tried to stop the tanker’s release, despite attempts by authorities in London and the British overseas territory to ease tensions with Iran.
Mr Baeidinejad said the US was “desperately” trying to block the release of the tanker, but they had faced a “miserable defeat”.
In a tweet, Iran’s foreign affairs minister Mohammad Javad Zarif accused the US of “piracy”.
He said: “Having failed to accomplish its objectives through its #EconomicTerrorism-including depriving cancer patients of medicine- the US attempted to abuse the legal system to steal our property on the high seas.
“This piracy attempt is indicative of Trump admin’s contempt for the law.”
The US made a late request to seize the vessel – and Mr Picardo said Gibraltarian authorities “will make an objective, legal determination of that request for separate proceedings”.
The detention of the Grace 1 tanker saw Iran retaliate by seizing the British-flagged oil tanker Stena Impero, which remains held by Tehran.
A spokesperson for the Stena Impero said the situation for the British-flagged tanker remains the same and they are awaiting further developments.
Analysts hope the release of the Grace 1 will mean the Stena Impero is also freed from detention.