That standard of proportionality appeared to have been set aside on Tuesday when Mr. Trump wrote on Twitter: “Any attack by Iran on anything American will be met with great and overwhelming force. In some areas, overwhelming will mean obliteration.” He called Mr. Rouhani’s comments “ignorant and insulting.”

Mr. Trump has at times shown a remarkable willingness to move past an exchange of insults. After he threatened to destroy North Korea with “fire and fury,” the country’s leader, Kim Jong-un, responded by calling Mr. Trump “mentally deranged” and a “dotard.” Months later, the two leaders met for face-to-face talks, though the negotiations have stalled.

But Iran is a different political entity from North Korea, one with multiple power centers. And it was notable that the most blistering critique of Mr. Trump and attacks on his mental capacity came from the moderate wing of the Iranian political system. The nuclear program is run by the more hard-line Islamic Revolutionary Guards Corps, which viewed the 2015 accord as a giveaway to the United States.

Within days, Iran said last week, it will have breached a key limit in the 2015 deal that restricts the country’s stockpiles of low-enriched uranium to 300 kilograms, or about 660 pounds. If that level is breached, it will be the beginning of the unraveling of the Iran deal on Tehran’s side; it already unraveled in Washington, where administration officials say that to Mr. Trump, the agreement is dead and buried.

“Iran leadership doesn’t understand the words ‘nice’ or ‘compassion,’ they never have,” Mr. Trump continued in his flurry of tweets. “Sadly, the thing they do understand is Strength and Power, and the USA is by far the most powerful Military Force in the world.”

Mr. Trump has sought to leave open a variety of options for pressuring Iran. A senior administration official said that after weekend meetings at Camp David, the White House had directed the intelligence agencies and the Pentagon — including the United States Cyber Command — to “start pushing proportional options” to Mr. Trump’s senior aides for consideration.