Gibraltar seized the Grace 1 on July 4 on suspicion it was transporting oil to Syria. (File)

The Iranian oil tanker at the centre of a diplomatic dispute has departed from Gibraltar after the British overseas territory rejected a US demand to seize the vessel.

According to the monitoring website Marine Traffic, the supertanker -- which had been detained since July 4 off the coast of Gibraltar -- lifted anchor Sunday evening and started sailing south.

Authorities in the British overseas territory have not confirmed its departure.

Gibraltar seized the Grace 1 on July 4 on suspicion it was transporting oil to Syria in breach of European Union sanctions, triggering a sharp deterioration in relations between Tehran and London. Iran has repeatedly denied any violations.

A Gibraltar judge ordered the tanker released last Thursday, with Iranian officials saying a new crew had arrived to pilot the vessel -- now renamed the Adrian Darya -- and its 2.1 million barrels of oil.

But on Friday, the US Justice Department filed a last-minute request to detain the ship, alleging it was involved in supporting illicit shipments to Syria by Iran's Islamic Revolutionary Guard Corps, listed as a terrorist group by Washington.

Gibraltar's government rejected that request, saying it could not seek a court order to detain the supertanker because US sanctions against Iran were not applicable in the European Union.

The vessel had turned east as of early Monday, although its ultimate destination was unclear.

In its decision ordering the release of the tanker, Gibraltar said it had received assurances from Iran that the vessel would not head to any country subject to EU sanctions.

Iran denied it had made any promises about the ship's destination to secure the release.

"Iran has given no assurances over the Grace 1 not going to Syria to secure its release," a state media website quoted foreign ministry spokesman Abbas Mousavi as saying.

The US State Department has threatened to issue a visa ban on anyone working on the ship.

The July 4 seizure came amid surging tensions in the Gulf after several alleged Iranian attacks on smaller tankers.

Iran termed the move an "illegal interception" staged by the United States, while Washington cheered it as "excellent news".

Iran subsequently detained the British-flagged tanker Stena Impero in what was seen as a tit-for-tat move.

Ties between Tehran and Washington have frayed since President Donald Trump withdrew last year from a landmark 2015 nuclear deal between major powers and Iran, reimposing crippling unilateral sanctions.