Trump sought to project a sense of calm as he addressed the nation Friday, claiming that the "flawless precision strike" had stopped Soleimani from carrying out an "imminent" attack on American diplomats.
"We took action last night to stop a war," the president said from his Florida vacation home. "We did not take action to start a war."
Trump has vacillated between his isolationist impulses and his desire to present an image of strength to foes around the world, leading to confusion about his foreign policy ideology, said Leon Panetta, who served as a defence secretary and CIA director in past Democratic administrations.
"Part of the problem that has led to this situation is a series of mixed messages from this administration as to exactly what the president stands for," he said. "We're now in this cycle of punch and counterpunch, and I just don't see how we're going to be able to successfully end this cycle before we get into a war."
Trump indicated that he is hoping to avoid a war with Iran, even as he asserted that the United States is "ready and prepared" for any retaliation from Tehran.
"I have deep respect for the Iranian people," Trump said. "They are a remarkable people, with an incredible heritage and unlimited potential. We do not seek regime change."
But Iranian leaders have publicly threatened retaliation, underscoring the significance of the airstrike that killed Soleimani, the longtime commander of Iran's Quds Force, on a road near the Baghdad airport.
Iraq's parliament planned to hold an extraordinary session on Sunday to discuss the attack, which Iraqi leaders condemned as a violation of sovereignty.
By owning the potential for conflict with Iran and potentially upending relations with Iraq, Trump is tempting war with the most potent adversary he is likely to face, short of a full nuclear conflict with North Korea. Iran is second only to Israel in the might of its military in the Middle East. It is economically and diplomatically connected across the world, including with US allies and in proximity to nations and interests dear to the United States, including Israel, Europe and the oil-rich Persian Gulf.
While US intelligence has closely tracked Soleimani for years, presidents George W Bush and Barack Obama rejected such a strike out of concern it would lead to war. Trump embraced that difference Friday, seeking to imply that he was tougher and more willing to confront adversaries than his predecessors.
"What the United States did yesterday should have been done long ago," Trump said. "A lot of lives would have been saved."
Trump's decision was immediately met with partisan rancour, as congressional leaders learned of the strike from public news reports rather than customary private briefings.
Senate Minority Leader Charles Schumer, D-NY, said he was not briefed as customary in such operations and warned, "This action may well have brought our nation closer to another endless war, exactly the kind of endless war the president promised he would not drag us into."
Some GOP lawmakers close to Trump also said they were not told about the operation before it happened - and said privately that they would have appreciated a briefing. But Republicans almost universally praised Trump publicly, even as some sought more information about what Soleimani's death might mean for the stability of the region.
"Ultimately it was his decisive action that made the difference," said Rep Mark Meadows, R-NC, a Trump confidant. "The pundits who say this will embolden terrorists must have 'Hug a Terrorist' bumper stickers on the back of their cars. It's ridiculous."
For Trump, Iran has been a constant source of interest since before he ran for office. He sharply criticised Obama in 2011, accusing him of inviting war to improve his re-election chances. He called the 2015 international diplomatic agreement limiting Iran's nuclear program a catastrophe and rejected US allies' pleas to retain the pact even if it was not perfect. He eventually overrode objections from his national security advisers and withdrew from the Iran nuclear deal in 2018.
Trump has also openly courted new talks with Iran, often praising the country for its own negotiating skills and promising that he could deliver the airtight deal he says Obama could not. As recently as September, Trump said he hoped for face-to-face negotiations with Iran's leaders.
Although Trump has taken provocative steps before, including designating Iran's Revolutionary Guard Corps as a terrorist organisation, he has also stepped back from potential conflict. He called off US airstrikes on Iranian facilities in June, following the downing of a US drone. And he took no military action following a devastating September attack on Saudi oil facilities that he blamed on Iran.
The head-snapping moves have left a trail of confusion in Washington and other global capitals about the nature of Trump's foreign policy doctrine.
When he campaigned in 2016, Trump touted an "America First" policy, arguing that wars in the Middle East had been colossal failures, costing American lives and treasure.
"War and aggression will not be my first instinct," he said in an April 2016 foreign policy speech. "A superpower understands that caution and restraint are really truly signs of strength."
The tension between Trump's desire to project toughness and his desire to pull back from Middle East conflicts is at its most critical point right now, as his 2020 re-election effort is gearing up.
Late Friday, Trump was privately telling his top advisers he was surprised at how quickly many Democrats have criticised him, according to a White House official who was not authorised to speak publicly.
Trump said that he feels like he caught the Iranians "red-handed" as they attempted to plan future attacks and finds it "almost funny" that Democrats "can't say, 'Wow, this is great,' " according to the official.
In particular, Trump is keeping close watch on former Vice President Joe Biden, who he continues to see as his likely future rival in the fall election campaign, the official and others close to the president said.
Still, White House officials and leading Republicans cautioned Friday that Trump should not be considered a hawk and said he was prone in meetings this week to bemoan "nation-building." They said he does not rely on the advice of generals as much as he did earlier in his presidency.
Some veteran Republicans see benefits for Trump's re-election campaign, especially in a potential match up with Biden.
"It's a very strong moment for him and a great contrast with Joe Biden," said former Sen Rick Santorum, R-Pa. "He can argue Biden and the Obama administration have always been indecisive, and I expect he'd make that case if it ends up being the president against Biden."
On Friday, White House senior adviser Jared Kushner and others had discussed a possible prime-time address by the president, but those plans did not materialise, according to a White House official and a top GOP lawmaker who spoke on the condition of anonymity to discuss the private deliberations.
Trump's Iran policy has faced withering criticism, as there has been little indication that the president's "maximum pressure" campaign has achieved its desired results.
"There's been a lack of realistic strategic thinking about the Iran policy since the beginning of the Trump administration," said David Schanzer, director of the Triangle Centre on Terrorism and Homeland Security at Duke University. "There is an idea that essentially it could be bullied into acting against its own interests, and I think that was unrealistic in light of the history of the relationship with the United States and the nature of the regime."
Robert Malley, president of the International Crisis Group and a former Obama administration official, said it is all but certain that Iran will respond in the wake of Soleimani's death. He cautioned that Iran may not do so immediately, meaning that US forces will have to be "on guard for a long time."
Panetta said he feared that Trump had not fully considered the risks associated with taking out Soleimani and disrupting the politics of a volatile region.
"The 21st century is a century in which we've easily gotten into wars but found it very difficult to get out of wars," he said. "So there is a greater responsibility now to evaluate just exactly what the consequences are going to be."