The result is a situation as volatile as it has been at any point in many years, one that will challenge an instinctive, combative and relatively inexperienced commander in chief to navigate his way through a perilous period without making the kind of mistake he has accused his predecessors of making. And he faces enormous skepticism from the critics who have long warned that he was too erratic to face moments of crisis.

The massive demonstrations and calls for retaliation in the region ultimately may not add up to more than “a little noise,” as Mr. Pompeo asserted. The Iraqi parliamentary vote to force American troops to leave was nonbinding and the caretaker government may not follow through if only to preserve a hedge against Iranian dominance. Even as Tehran vowed to move ahead with its nuclear program, it kept its options open by not expelling international inspectors.

And some experts on the region suggested that Mr. Trump’s very unpredictability was a deterrent in itself, arguing that the killing of General Suleimani may have been so brazen and shocking to Iranian leaders that they will be wary of provoking an American president evidently willing to escalate in ways his predecessors were not.