MADRID — Authorities in Gibraltar said Thursday they intercepted an Iranian supertanker believed to be breaching European Union sanctions by carrying a shipment of Tehran’s crude oil to war-ravaged Syria.

A senior Spanish official said the operation was requested by the United States. Iran’s state-run IRNA news agency described the incident as “an illegal seizure of an Iranian oil tanker.”

Gibraltar port and law enforcement agencies, assisted by Britain’s Royal Marines, boarded the Grace 1 early Thursday, authorities on the British overseas territory at the tip of Spain said in a statement.

It added that the vessel was believed to be headed to the Baniyas Refinery in Syria, a government-owned facility under the control of Syrian President Bashar al-Assad and subject to the EU’s Syrian Sanctions Regime.

The EU and others have imposed sanctions on Assad’s government over its continued crackdown against civilians. They currently target 270 people and 70 entities.

Spain’s caretaker foreign minister Josep Borrell said the tanker was stopped by British authorities after a request from the United States.

Iran later summoned the British ambassador in Tehran to answer questions about the operation. Iranian Foreign Ministry spokesman Abbas Mousavi said in a tweet that Rob Macaire was summoned over the “illegal interception” of the ship.

Mousavi later called the ship’s seizure “odd and destructive.” ”It can cause an increase in tensions in the region,” he said in a live telephone interview on state television Thursday night.

In Madrid, Borrell told reporters that Spain is assessing the implications of the operation because the detention took place in waters it considers its own.

Britain insists Gibraltar is part of the United Kingdom but Spain argues that it is not, and the tanker operation risks offending the Spanish.

“We’re looking into how this (operation) affects our sovereignty,” said Borrell, who was nominated earlier this week to become the EU’s foreign policy chief.

The Gibraltar authorities didn’t confirm the origin of the ship’s cargo, but Lloyd’s List, a publication specializing in maritime affairs, reported this week that the Panama-flagged large carrier was laden with Iranian oil.

According to a UN list, the ship is owned by Singapore-based Grace Tankers Ltd.

The vessel likely carried just over 2 million barrels of Iranian crude oil, the data firm Refinitv said. Tracking data showed that the tanker made a slow trip around the southern tip of Africa before reaching the Mediterranean, it said.

The tanker’s detention comes at a particularly sensitive time as tensions between the US and Iran grow over the unraveling of a 2015 nuclear deal, which President Donald Trump withdrew the US from last year. Trump has also slapped sanctions on Iran and recently approved the passage of a carrier group, bombers and fighter jets to the Persian Gulf.

In recent days, Iran has broken through the limit the deal put on its stockpile of low-enriched uranium and plans on Sunday to boost its enrichment. Meanwhile, oil tankers near the Strait of Hormuz have been targeted in mysterious attacks as Iranian-backed rebels in Yemen launch bomb-laden drones into Saudi Arabia. The US has rushed thousands of additional troops, an aircraft carrier, B-52 bombers and F-22 fighters to the region, raising fears of a miscalculation sparking a wider conflict. Last month Iran shot down a US surveillance drone, further stoking those fears.

Iran’s intelligence minister said Thursday that any negotiations with the US would have to be approved by Supreme Leader Ayatollah Ali Khamenei and would require the lifting of US sanctions. Khamenei has until now ruled out talks with the US, saying that Washington cannot be trusted.

On Thursday, the official IRNA news agency quoted Information Minister Mahmoud Alavi as saying that “if the supreme leader permits, negotiations between Iran and the United States will be held.” He added, however, that Tehran would not negotiate under pressure.

There was no immediate reaction to the tanker’s detention from Syria, which has suffered severe fuel shortages as a result of the civil war and Western sanctions that have crippled the country’s oil industry, once the source of 20 percent of government revenues.

Iran, which has provided vital military support to Assad, extended a $3 billion credit line for oil supplies beginning in 2013, but the Iranian aid dwindled as Washington restored tough sanctions. In November, the US Treasury Department added a network of Russian and Iranian companies to its blacklist for shipping oil to Syria and warned of “significant risks” for those violating the sanctions.

Fabian Picardo, chief minister of Gibraltar, which in the past has been a transit port for energy shipments without known buyers, said he has informed the EU about developments.

In a statement, the British government welcomed the “firm action” by authorities in Gibraltar.