A blizzard of potential threats had already come throughout the day — of attacks with missiles and rockets, of terrorist strikes against Americans elsewhere in the Middle East, even one warning that hundreds of Iran-backed militia fighters might try to assault Al Asad Air Base, a sprawling compound in Iraq’s western desert.

But the specificity of the afternoon’s latest warning sent Vice President Mike Pence and Robert C. O’Brien, the White House national security adviser, to the basement of the West Wing, where aides were assembling in the Situation Room. President Trump joined shortly after wrapping up a meeting with the Greek prime minister.

Three hours later, a hail of ballistic missiles launched from Iran crashed into two bases in Iraq, including Al Asad, where roughly 1,000 American troops are stationed. The strikes capped a frenetic day filled with confusion and misinformation, where at times it appeared that a dangerous military escalation could lead to a broader war. Mr. Trump spent hours with his aides monitoring the latest threats. Military planners considered options to retaliate if Iran killed American troops.

The early warning provided by intelligence helps explain in part why the missiles exacted a negligible toll, destroying only evacuated aircraft hangars as they slammed into the desert sand in barren stretches of the base.