DUBAI — Britain will work for the release of an Iranian supertanker seized near Gibraltar if Iran guarantees the ship will not travel to Syria in breach of European Union sanctions, the British foreign secretary said, in a move that could ease soaring tensions between Iran and the West.

Jeremy Hunt said late Saturday that he had held a “constructive call” with his Iranian counterpart, Mohammad Javad Zarif, in regards to the oil tanker’s detention in the Mediterranean this month. 

“I reassured him our concern was [the] destination not [the] origin of the oil” carried by the vessel Grace 1, Hunt said on Twitter. Authorities in Gibraltar said the tanker was carrying 2.1 million barrels of light crude oil and they suspected it was headed to the Syrian port of Baniyas in violation of E.U. sanctions.

Iran called the seizure an “act of piracy” and vowed to retaliate against British shipping assets in the Persian Gulf. 

On Thursday, Britain said that it had thwarted an Iranian attempt to block a British oil tanker traversing the Strait of Hormuz, a key waterway for global energy exports just off Iran’s coast. A British naval escort was able to deter three Iranian vessels approaching the ship, British Heritage, a government statement said. Iran has denied involvement in the incident. 

Britain “would facilitate release” of the Iranian supertanker “if we received guarantees that it would not be going to Syria, following due process” in Gibraltar courts, Hunt said. 

This month, Gibraltar, a British territory, passed a law allowing authorities to seize “specified ships” suspected of breaching E.U. sanctions. British Royal Marines assisted in the operation to detain the tanker on July 4. 

Britain “must immediately adopt required measures to end the illegal seizure of the Iranian oil tanker,” Zarif said in his conversation with Hunt, Iranian state television reported. 

Iran has said it believes the ship was detained at the request of the United States, which has sought to curb Iranian oil exports as part of a “maximum pressure campaign” against the Islamic republic.

“Iran will continue its oil export under any circumstances,” state media quoted Zarif as saying.

The episode comes amid a wider confrontation brewing between the United States and Iran in the gulf region in recent weeks, following a spate of attacks on commercial tankers and the downing of a U.S. Navy spy drone by Iranian forces last month. 

Last year, the Trump administration abandoned the 2015 nuclear deal Iran struck with world powers and, in violation of the agreement, reimposed a near-total embargo on the Iranian economy.

The agreement had curbed Iran’s nuclear activities in exchange for widespread sanctions relief. 

Iran has responded by ramping up uranium enrichment beyond levels set by the accord. It also recently breached the 300-kilogram limit on its stockpile of enriched uranium, part of a strategy it says is aimed at persuading European nations to reset the terms of the deal. 

On Sunday, the spokesman for Iran’s mission to the United Nations, Alireza Miryousefi, said in a tweet that Zarif had arrived in New York for a meeting of the U.N. Economic and Social Council.

The U.S. decision to scrap the agreement has put it at odds with its European allies, who say they are committed to the accord

In leaked diplomatic cables published by Britain’s Mail on Sunday, the British ambassador to the United States, Kim Darroch, criticized the Trump administration for abandoning the agreement.

He said the administration was “set upon an act of diplomatic vandalism” and that President Trump appeared to be leaving the deal for “personality reasons” because it had been agreed upon by his predecessor, Barack Obama, the Mail reported.

The cables were the latest in a string of leaks published by the Mail revealing the ambassador’s frank assessments of the White House.  

Darroch resigned Wednesday, saying it was “impossible” for him to continue in his role.