But the United States, the European Union and several world powers including Russia and China were alarmed enough at Iran’s decades-long pursuit of the technology to build a nuclear bomb that they agreed to act in concert in 2015 to lift sweeping economic sanctions on Iran in exchange for limitations on its nuclear activity.

Mr. Trump withdrew from that deal last year, demanding that Iran agree to more stringent limits on its nuclear and conventional military activities. He has replaced that approach with a so-called maximum pressure campaign of new sanctions and threats aimed at forcing Iran to accept his conditions, culminating in May with a tightening of penalties intended to block Iranian oil sales anywhere in the world.

As Iran’s exports fell to around 300,000 barrels a day from 2.5 million, officials in Tehran have denounced the latest restrictions as “economic warfare.”

Tensions between Washington and Tehran have risen to their highest level in more than two decades, and the United States last month came within minutes of launching a missile strike against Iran in retaliation for the shooting down of an American surveillance drone. Mr. Trump called the strike off only moments before launching.

The United States and other allies have accused Iran of using naval mines to damage a total of six tankers in two attacks over the last two months around the crucial oil shipping lanes in and out of the Persian Gulf, accusations Iranian officials have denied.

The other signatories — Britain, China, France, Germany and Russia — have continued to support the deal and urged Iran to abide by it even though the United States has withdrawn. In its most significant break with the Trump administration, the European Union has even tried to throw the Iranians an economic lifeline in the form of an alternative trading mechanism to help bypass the American financial system and new American sanctions.

But that effort has largely failed.

Mr. Rouhani has said that Iran would gradually stop complying with the restrictions if the European nations failed to provide some relief from the economic pain within two months of the latest constriction of the American sanctions — a deadline that falls on Sunday.