Addressing the nation Wednesday following Iranian ballistic missile strikes on U.S. military bases in Iraq, President Trump seemed intent on de-escalating the crisis with Tehran.

But with his conciliatory posture, Trump wasn’t merely managing a crisis that had arrived unprovoked on the nation’s doorstep. This was a crisis he had arguably created himself, by authorizing last week’s killing of one of Iran’s top generals and threatening to annihilate that country.

And when Trump strode into the grand foyer of the White House residence on Wednesday — illuminated by a halo of winter sunlight and flanked by the uniformed Joint Chiefs of Staff, as well as his vice president and secretaries of state and defense — the president seemed to be celebrating a victory, even in the wake of a sovereign power’s direct attack on U.S. forces.

“The American people should be extremely grateful and happy no Americans were harmed in last night’s attack by the Iranian regime,” Trump said. He added, “Iran appears to be standing down, which is a good thing for all parties concerned and a very good thing for the world.”

Trump’s handling of the Iran crisis in some ways epitomized his presidency, with his remarks containing striking contradictions and remaining open to interpretation. He was at once unyielding in his rhetoric against Iran building a nuclear weapon while open to talks with its leaders and pushing to involve NATO allies in diplomacy.

Trump sought to extend his administration’s “maximum pressure” strategy by announcing toughened economic sanctions on Iran yet also promised to help the country build prosperity at home. He sounded both bellicose — describing the arsenal of weapons at his disposal as “big, powerful, accurate, lethal and fast” — and dovish, saying he did not want to use it and was “ready to embrace peace.”

Indeed, the president’s remarks offered something of a verbal choose-your-own-adventure, both for voters watching at home and for leaders and diplomats around the world parsing his every word.

“As long as I am president of the United States, Iran will never be allowed to have a nuclear weapon,” Trump said in his abrupt opening sentence before briefly pausing, straightening his arms and seeming to begin his speech anew, with a simple “Good morning.”

Trump’s teleprompter address was just nine minutes long, delivered in the chandeliered and marble-floored White House foyer and with the painted visage of George W. Bush staring down at him from inside a golden frame on the wall.

The president and his aides made the intentional choice to mostly turn away from his characteristic pugilism in an attempt defuse a rapidly escalating diplomatic crisis. To that end, Trump said little to which the Iranians might feel compelled to respond, with the president offering a more nuanced version of what he has previously said overtly: that he does not seek regime change in Iran.

“Finally, to the people and leaders of Iran, we want you to have a future — and a great future, one that you deserve, one of prosperity and home and harmony with the nations of the world,” Trump said as he wrapped up.

Christopher R. Hill, a former ambassador to Iraq who served as a diplomat in the four previous administrations, argued that Trump’s speech was being graded on a curve by many and that the president’s remarks could still be heard as provocative in the region, especially his sharp dismissal of the 2015 Iran nuclear deal.

“I think some of the American commentary was too much looking for the pony in the stable,” Hill said. “Gone was all the talk about going after cultural sites and not as much end zone dancing about Soleimani’s death as there could have been, but I think measured against some kind of standard deviation, I think it was a very, very tough-minded speech.”

One of the more combative and dubious lines in Trump’s speech was about former president Barack Obama. After dismissing Obama’s Iran deal as “very defective,” Trump then sought to assign blame for Tuesday night’s missile attacks.

“The missiles fired last night at us and our allies were paid for with the funds made available by the last administration,” Trump said in making a claim deemed both misleading and far-fetched by The Washington Post’s Fact Checker, although he did not mention Obama by name.

Trump’s stagecraft — a concerted tableau of military might — seemed intended to project strength to adversaries abroad more so than to reassure American citizens who were jittery following a week of provocations. Much of his language was directed at other world leaders, including NATO allies from whom he sought support in the Middle East.

Trump’s address — the tone and substance, as well as the mere fact of it — evolved in the less than 24 hours after Iran fired over a dozen ballistic missiles on two bases in Iraq where U.S. troops are stationed. Trump huddled Tuesday night for a little over an hour with top national security officials — including Defense Secretary Mark T. Esper and Secretary of State Mike Pompeo — who counseled restraint and worked to keep the situation from spiraling out of control.

There were mixed messages from the White House press office about whether the president would address the nation that evening, and one person familiar with the deliberations said that although Trump always planned to issue some sort of statement, it was unclear that he would actually deliver a live speech Wednesday until reports of such remarks began leaking to the media.

Administration officials at the time said the president’s response probably would hinge on any loss of American life — and some later argued that it was prudent to wait until the next morning to make any final decisions, when they had a clearer damage assessment.

And Trump did, in fact, tout the lack of casualties early in his Wednesday speech. “No American or Iraqi lives were lost because of the precautions taken, the dispersal of forces, and an early warning system that worked very well,” he said.

Administration officials stressed that the president played a key role in writing the speech, although as with many of his official addresses, it was drafted with help from a cadre of top advisers: Esper; Trump son-in-law and senior adviser Jared Kushner; White House Staff Secretary Derek Lyons; senior policy adviser Stephen Miller; Vice President Pence; and Pompeo, according to people familiar with how the remarks came together. Treasury Secretary Steven Mnuchin was also present.

The speech ultimately grew in length and ambition as the group worked over it Wednesday morning, several officials said, with the president making edits in the Oval Office until just before he stepped into the Grand Foyer.

Trump, who has long used stagecraft as a tool for branding his presidency, tried to signal that he saw the moment as weighty. It was the president who decided at the last minute to open his speech to the full press corps, ensuring more journalists would be able to bear witness.

Trump’s staff seemed to sense the gravity of the moment, as well.

Some White House employees who had little to do with national security filed into the foyer to watch their boss speak, including impeachment advisers Pam Bondi and Tony Sayegh, as well as Andrew Giuliani, who works in the Office of Public Liaison and whose father is the president’s personal attorney.

Trump, who often steps on his own scripted messages by fielding questions from reporters, was disciplined.

“I want to thank you, and God bless America. Thank you very much. Thank you. Thank you,” Trump said, turning his back on the shouted questions and wordlessly returning through the twin wooden doors through which he had entered.