The nearly month-long detention of the Grace 1 is "the most successful implementation of the European sanctions regime to date," the head of Gibraltar's government said Thursday.

Chief Minister Fabian Picardo issued a statement, hours after the 300,000-dwt Grace 1 (built 1997) was ordered released by a court in the British overseas territory, detailing the rationale for detaining the VLCC and the reasons for letting it go.

"Gibraltar can be proud of the role it has discharged in guarding the entrance to the Mediterranean and enforcing EU sanctions," Picardo said.

He said the arrest stemmed from information he received that the Grace 1 and its cargo of 2.1 million barrels of crude oil were headed to the Baniyas Oil Refinery in Syria, in violation of sanctions against the Bashar al-Assad regime.

Post seizure, investigations were undertaken confirming Picardo's tip.

On 19 July — the same day the 50,000-dwt Stena Impero (built 2018) was seized by Iran in the Strait of Hormuz — Picardo met with Iranian officials in London, which he called "positive and constructive" and during which he said he made clear the detention was over Syria sanctions.

Iran requested the super-tanker be released 5 August and 13 August the Islamic republic's government confirmed the cargo would not be delivered to Syria.

Picardo said the detention and change of destination deprived Syria of $140m worth of crude oil.

He also said the cargo's confirmed owner is the National Iranian Oil Company and that it has been re-flagged as Iranian and re-insured.

"In light of the assurances we have received, there are no longer any reasonable grounds for the continued legal detention of the Grace 1 in order to ensure compliance with the EU Sanctions Regulation," he wrote.

The detention of the Grace 1 on 4 July ratcheted up tensions in and around the Middle East Gulf that was already the site of alleged tanker attacks by Iran in May and June.

It is widely speculated that the Stena Impero was taken in retaliation, though the UK government has denied it.

The Stena Impero's arrest prompted the UK to send two warships to the region and the US to push for the creation of a coalition to defend commercial shipping in the region. Only the UK has joined so far.

The Grace 1's release was held up briefly by an application by the US Department of Justice requesting the ship remain in detention.

Picardo said that was a matter for the territory's Mutual Legal Assistance, which "will make an objective, legal determination of that request for separate proceedings."

The Department of Justice did not return requests for comment on their legal rationale for further detention of the tanker.

Iran's foreign minister Javad Zanif accused the US of piracy and economic terrorism in trying to hold the ship any longer in a tweet.

He also posted a 29 July letter to Picardo and the UK's Foreign and Commonwealth Office denying that the crude was set for delivery to "an EU sanctioned entity."