Tehran set a deadline for the deal’s European signatories, including Britain, to come up with a strategy to ease their impact. When that deadline passed, Iran began to reduce its compliance with the accord.

The remaining European signatories to the nuclear deal and Iran will meet in Vienna on Sunday in a bid to save the current agreement amid the backdrop of the increasing tensions in the Persian Gulf and surrounding area, a major conduit for the world’s crude oil supply.

Iran called the seizure of the ship off Gibraltar “piracy” and accused Britain of acting on Washington’s wishes, before threatening to capture a British ship in retaliation. Mr. Hunt, the British foreign secretary, called Iran’s seizure last week of the British vessel a “tit for tat.”

Mr. Hunt, the runner-up in the race to replace Theresa May as prime minister, said on Monday that Britain would be working with European nations to create a protection unit to defend ships passing through the area, and called the seizure of the British vessel “state piracy.”

“When it comes to freedom of navigation, there can be no compromise,” he said, speaking to Parliament, before proposing a “much broader alliance of countries” to provide security to commercial vessels in the region.

Mr. Hunt also sought to distance his country from the tensions between the United States and Iran over the 2015 nuclear deal, noting that Britain “will not be part of the U.S. maximum pressure policy on Iran.”

The dispute over the seized tankers was the latest in a series of back-and-forth episodes between Iran and the West.