Gibraltar has decided to free the Iranian oil supertanker Grace 1, detained off the British overseas territory six weeks ago by Royal Marines, despite a last-minute attempt by the United States to seize the vessel.
The Grace 1 was detained on suspicion it was smuggling oil to Syria in breach of European Union sanctions.
Gibraltar Chief Minister Fabian Picardo on August 15 lifted the detention order after formal written assurances from Tehran that the ship will not discharge its more than 2 million barrels of oil in Syria, but added that the ship had not yet been released.
The detention order on the Grace 1 was set to expire on the evening of August 17.
"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," Picardo said.
It was not immediately clear when the Grace 1 would sail.
The decision to release the tanker came despite a last-minute attempt by Washington to seize the tanker.
"That is a matter for our independent Mutual Legal Assistance authorities, who will make an objective, legal determination of that request for separate proceedings," Picardo said.
After Gibraltar's decision was announced, Iran's foreign minister accused Washington of attempted piracy in trying to prevent the release of the oil tanker.
"The U.S. attempted to abuse the legal system to steal our property on the high seas," Mohammad Javad Zarif tweeted. "This piracy attempt is indicative of [U.S. President Donald] Trump admin's contempt for the law."
On July 19, two weeks after the seizure of the Grace 1, Iran's Islamic Revolutionary Guards Corps seized the British-flagged Stena Impero in the Persian Gulf.
Both London and Tehran have denied planning to swap the vessels.
Iran's envoy to London, Hamid Baeidinejad, said Washington was "desperately" trying to block the release but faced a "miserable defeat."
He tweeted that the vessel would be leaving Gibraltar soon.
The spat between Tehran and London came amid rising tensions in the Gulf after the United States last year withdrew from the 2015 deal between world powers and Tehran.
Washington has appealed to its partners to help create a maritime security mission to help safeguard shipping and other interests in the Gulf.
Earlier, Britain said it was joining the U.S.-initiated task force to escort ships through and around the region, though some other European powers, most notably Germany, have rejected the idea fearing the United States will use the force as part of its "maximum pressure" campaign against Iran.
The captain and three officers of the Grace 1 have already been released from arrest.