Gibraltar on Thursday allowed a detained Iranian supertanker to leave the British overseas territory after a last-minute U.S. attempt to seize the vessel, potentially defusing tensions between London and Tehran as a British-flagged tanker remains held by the Islamic Republic.
The release of the Grace 1 comes after the U.S. under President Donald Trump pulled out of Iran's nuclear deal with world powers over a year ago, setting in motion a growing confrontation between Tehran and the West over its atomic program. In past weeks, the Persian Gulf region has seen six attacks on oil tankers that the U.S. has blamed on Iran and the downing of a U.S. surveillance drone by Iranian forces. Iran has denied being behind the tanker attacks, though it has seized other tankers.
The Gibraltar Chronicle newspaper reported there was no U.S. application before the court when a hearing on the Grace 1 resumed Thursday afternoon, quoting the court's chief justice, Anthony Dudley. That allowed the ship to be freed.
That's a stark change from a morning hearing, which saw Gibraltar say the Justice Department sought to seize the vessel "on a number of allegations."
Dudley said that were it not for the U.S. move, "the ship would have sailed," the Chronicle reported.
The Justice Department did not respond to requests for comment.
Britain's Foreign Office said in a statement that the "investigations conducted around the Grace 1 are a matter for the government of Gibraltar" and that it couldn't comment further.
Prime Minister Boris Johnson's Downing Street office said Iran was discussed during the U.K. leader's meeting with Trump's national security adviser John Bolton earlier in the week, though no details were released on the talks.
The Grace 1, carrying 2.1 million barrels of Iranian crude, was seized last month in a British Royal Navy operation off Gibraltar. The vessel was suspected of violating European Union sanctions on Syria, namely its Banyas refinery, where the Grace 1's cargo was allegedly headed, according to authorities in Gibraltar. Iran called the seizure an "act of piracy."
Shortly after the detention of the Grace 1, Iran seized the British-flagged oil tanker Stena Impero, which remains held by the Islamic Republic. Analysts had said the release of the Grace 1 by Gibraltar could see the Stena Impero similarly released.
Signaling preparations for the expected release of the ship, the captain, an Indian national, and three officers of the Grace 1 were released from detention Thursday, the government said.
The whereabouts of the released crew, none of whom are Iranian, were not immediately known. The crew of the Grace 1 includes sailors from India, Pakistan and Ukraine, according to Iranian state television.
Beyond a few Gibraltar-flagged patrol boats, an Associated Press crew saw little security around the tanker on Thursday as speculation mounted over its impending release. A handful of men could be seen from a distance on the deck, some of them carrying binoculars and looking into the horizon.
This is the second time the Trump administration has moved to seize a ship in recent months. In May, the Justice Department announced that it had seized a North Korean cargo ship used to supply coal to the isolated nation in violation of international sanctions.
Tensions have escalated in the Persian Gulf region since Trump over a year ago unilaterally withdrew the U.S. from Iran's 2015 nuclear deal with world powers. The decision stopped billions of dollars' worth of business deals, largely halted the sale of Iran's crude oil internationally and sharply depreciated Iran's currency, the rial.
In recent weeks, Iran has begun to step away from the nuclear deal by increasing its production and enrichment of uranium. It has threatened to take further steps in early September if Europe can't help it sell its oil abroad.
Lina Khatib, head of the Middle East and North Africa program at Chatham House, said the U.S. request on the Grace 1 was based on its own imposed sanctions on Iran, and not the EU's sanctions on oil exports to Syria.
"Although the U.S. expects its European allies to abide by these sanctions, it is up to the Gibraltar authorities to assess the allegations presented by the U.S.," Khatib said.
Resolving the tanker dispute would help Prime Minister Johnson focus on domestic issues as he works to complete Britain's exit from the European Union and prepare for anticipated national elections over the next few months.
The U.S. has been asking its allies to take part in a naval mission to protect shipping in the strategic Strait of Hormuz, at the Mouth of the Persian Gulf, though European nations have been reluctant.
Britain has so far been the only one to express willingness to join a maritime security mission. It has also been giving U.K.-flagged vessels a naval escort since the Iranian Revolutionary Guard's seizure of the Stena Impero.
More must-read stories from Fortune:
—When will Twitter ban white nationalists? Civil rights leaders urge action
—Several states suing Trump's EPA over new 'dirty power' rule
—Why the U.S. labeled China a currency manipulator
—How Trump’s plan to import Canadian drugs would work
—Listen to our audio briefing, Fortune 500 Daily
Get up to speed on your morning commute with Fortune’s CEO Daily newsletter.