Similarly, expectations of a confrontation in Iraq after the Iranian consulate in Basra was torched in September proved unwarranted. Instead, Iran quietly helped Iraqis forge a political alliance that formed a government reliant on Iranian-backed militias that the United States wants disbanded.

Now, the leaders in Tehran may well expect that a weakened Saudi Arabia could be compelled to end both its military campaign in Yemen and its blockade of Qatar. All along, the Iranians have sought talks with the Saudis, who may be ready to talk to them — especially if the Saudis take American advice and decide to end the Yemen war. The government in Riyadh may also find it necessary to mend relations with Iran to rebalance its relations with Turkey, which has been aligned with a buoyant Qatar and was further angered by the Saudi assassination on Turkish soil.

Remaining calm, in turn, might give Iran’s leaders greater confidence in their own bargaining power, perhaps to the point of talking to the United States about its nuclear and missile programs. The ruling circles in Tehran already seem confident that the economy has absorbed much of the shock of American sanctions and that Iran can sell enough oil and have enough trade with Europe, China, Russia and India to keep its economy afloat. Conservatives and moderates have formed a united front to rally the population to the flag and to fend off any popular discontent that the United States might hope economic hardship would bring.

The Trump administration has derided the nuclear deal, asserting that it was failing to curb Iran’s regional influence and claiming to want a new deal strong enough to do just that. But Mr. Trump will now find it even more difficult to deliver on his promise of forcing Iran to come to the table on his terms. If Iran comes at all, it will not be in a position of abject weakness. All it needs to do is remain committed to the deal it signed with Barack Obama and let Mr. Trump recognize that his “maximum pressure” strategy falls short. Then Tehran might be ready to talk.

From the start, the Trump administration thought it could rein in Iran’s regional influence by forging a close partnership with Saudi Arabia’s young crown prince, Mohammed bin Salman. But a series of heavy-handed Saudi missteps, culminating in the murder of Mr. Khashoggi, have backfired, leaving Iran with much more room for strategic initiatives.