Under the 2015 deal, Mr. Obama got Iran to dismantle key pieces of its nuclear program and submit to intrusive inspections. But much of the deal was temporary. The limits on Iran’s development of nuclear centrifuges expire in 2025, and the limits on its enrichment of uranium expire in 2030.

Tehran was promised relief from suffocating economic sanctions, and no limits were placed on its conventional military or behavior in the region. In international diplomacy, Iran for the first time won the right to enrich at least a limited amount of uranium to at least a low level, sufficient for some civilian uses.

Why did President Trump reject that approach?

Mr. Trump and other critics argued, with some evidence, that Iran was exploiting the opportunity to fortify its conventional military and to build up its allied militias around the region. Convinced that Iran’s theocratic rulers would remain implacably hostile to the United States and its allies, the critics argued that Iran would emerge with greater resources to race toward a nuclear weapon, once the deal’s provisions on nuclear fuel enrichment had expired.

So after withdrawing from what he called a “terrible” deal last year, Mr. Trump embarked on a campaign of “maximum pressure” to force Iran to accept far more comprehensive and permanent restrictions. That campaign consisted of reimposing economic sanctions and, in May, measures to cut off almost all of Iran’s oil sales. Iranian officials have denounced those measures as a form of warfare.

Curiously, as some critics have noted, Mr. Trump is now approaching North Korea in the same way Mr. Obama approached Iran. He has sought to build a personal connection to its leader, Kim Jong-un, tempting him with visions of international investment and economic development if North Korea stops pursuing a nuclear weapon.

And in what critics call a further confusion, Mr. Trump has sometimes hinted that, even with Iran, he might be willing to compartmentalize the nuclear issue. “You can’t have nuclear weapons. And other than that, we can sit down and make a deal,” Mr. Trump said in a recent television interview, summarizing his message to Tehran.