Iran has warned the US against attempting to seize an Iranian oil tanker in open seas after its release from Gibraltar.

The tanker, which has been caught in a standoff between Tehran and the west, was sailing for Greece on Monday, shipping data showed, hours after the British territory rejected a US request to detain the vessel further. MarineTraffic reported its destination as the Peloponnesian city of Kalamata.

Asked whether the US might renew its seizure request after the tanker sailed from Gibraltar, an Iranian foreign ministry said: “Such an action … would endanger shipping safety in open seas. We have issued a warning through official channels, especially the Swiss embassy.”

Switzerland represents US interests in Iran. Tehran has no official diplomatic relations with Washington.

The ship, formerly known as the Grace 1 but renamed by Iran as the Adrian Darya 1, is carrying 2.1m barrels of oil, a cargo is worth an estimated £115m.

Royal Marines seized the vessel off Gibraltar on 4 July, saying it was carrying oil bound for Syria in breach of EU sanctions.

That prompted Iran to seize the British-flagged tanker Stena Impero in the Gulf in retaliation a fortnight later, sparking a diplomatic crisis between the two countries. Britain responded by sending a second warship to the Gulf to offer greater protection to merchant shipping.

Iran has denied that its tanker was heading for Syria, and the vessel’s detention appeared to ended last week after Iran gave a written commitment to Gibraltar that it would not sail to Syria or anywhere else covered by EU sanctions.

There was fresh legal uncertainty on Friday, however, when a federal court in Washington issued a warrant for the seizure of the supertanker, the oil it carries and nearly $1m (£820,000), saying there had been a breach of US sanctions against Iran.

The US claims the tanker is controlled through a network of front companies by Iran’s Revolutionary Guard, which Washington designates as terrorist organisation and is one of the targets of its sanctions.

Gibraltar said on Sunday it was unable to comply with the US request because it was bound by EU law. “The EU sanctions regime on Iran is fundamentally different to that the US,” Gibraltar said. The authorities also said the Revolutionary Guard was not designated a terrorist organisation under EU, UK or Gibraltar law.

Without the territory agreeing to the US request, there were no immediate legal obstacles left to the supertanker setting sail.

The Astralship shipping agency in Gibraltar, which has been hired to handle paperwork and arrange logistics for the Adrian Darya 1, told the Associated Press that a new crew of Indian and Ukrainian nationals were replacing the sailors on board.

The Iranian ship was detained while sailing under a Panamanian flag. Video footage and photographs taken on Sunday showed it flying the Iranian flag and with its new name painted in white over its previous one on the hull.

Reuters contributed to this report