Escalation with Iran may depend on who prevails inside Washington and Tehran

“It is sort of a toxic interaction between hard-liners on both sides because for domestic political reasons they each want greater tension,” said Jeremy Shapiro, the research director at the European Council on Foreign Relations and a former State Department official.

“They have an incentive to create that tension, at the very least, because it will help them with their domestic politics and you can see that on both sides,” he added.

In Iran, tension with the United States bolsters the appeal of hard-line politicians aligned with the Revolutionary Guards in next year’s parliamentary elections.

In Washington, it strengthens the hand of hawks in the administration who may be trying to urge Mr. Trump toward more forceful action while weakening the claims of his critics — including most Democrats — who argue that President Barack Obama’s outreach to Tehran had been working.