A ship approaches supertanker Grace 1 off the coast of Gibraltar on July 6, 2019. - Iran demanded on July 5, 2019 that Britain immediately release an oil tanker it has detained in Gibraltar, accusing it of acting at the bidding of the United States.

An Iranian oil tanker held in Gibraltar since early July has been officially released by local authorities, although it may not sail if a U.S. application to seize the vessel proves successful.

On July 4, Gibraltar authorities with the help of the British Royal Marines, seized the Grace 1 oil tanker following suspicions it was delivering oil to the Syrian regime — a violation of European Union sanctions. Tehran claimed the tanker was not headed to Syria and that the seizure was unlawful.

Gibraltar's Chief Minister Fabian Picardo said in a statement Thursday that he had received written assurance from the Republic of Iran that, if released, Grace 1 would not sail to Syria.

Picardo added that there was no longer any "reasonable grounds" to hold the ship as Iran had made "an important material change in the destination of the vessel and the beneficiary of its cargo."

Gibraltar is a U.K. overseas territory at the south west tip of Spain that sits at the mouth of the Mediterranean Sea.

Earlier Thursday, the Gibraltar Chronicle reported that a judge had previously been due to lift the detention on the ship but an application by the U.S. Department of Justice to the Supreme Court of Gibraltar had delayed the release.

In the statement, Picardo confirmed that the DOJ had asked for a new legal procedure to immediately detain the ship again. It is therefore not clear if the tanker will sail.

Picardo appeared to absolve responsibility for the fresh U.S. request, stating that it was for "Mutual Legal Assistance authorities who will make an objective, legal determination," before adding, "The Grace 1 is therefore now released from detention under the Sanctions Act by operation of law as confirmed this afternoon by the Chief Justice of the Supreme Court."

Iran's ambassador to the U.K., Hamid Baeidinejad, said in a tweet that the tanker had now been released from "Illegal detention."

On July 19, in an apparent tit-for-tat response, the Iranian military captured the British-flagged oil tanker Stena Impero close to the Strait of Hormuz. U.K. authorities described the move as "state piracy."

The ship and crew remain impounded in an Iranian port and any release is seen as unlikely if Grace 1 is not first released from Gibraltar.

Crude oil prices have continued to fall Thursday. At 11:00 a.m. ET, the Brent Crude October expiry contract was lower by more than 2.4% at $58.01 per barrel.