But on Tuesday, it was clear that something or someone had changed Trump's mind.
The president said at a White House news conference on Tuesday with French President Emmanuel Macron at his side that before the US withdraws from Syria, "we want to leave a strong and lasting footprint."
The Syrian War: The power struggle explained
This long-term approach, he added, was "a very big part" of his conversation with Macron, who told reporters he and Trump agreed the Syria problem involved more than Trump's priority of ridding the country of Islamic State extremists.
The two leaders indicated that they see Syria as part of a broader problem of instability in the Middle East, which includes Iran's role in Syria and Iraq.
That kind of strategic thinking bears little resemblance to Trump's words in late March when he said it was time to leave Syria to others.
"We got to get back to our country, where we belong, where we want to be," he said on March 29. His comments raised questions about US intentions, including its commitment to the Syrian Kurds who have been the main US proxy in fighting IS in Syria and who face an uncertain future.
Since then, Trump has taken a markedly different course, including bombing three suspected chemical weapons sites in western Syria on April 13.
Trump said then he was committed to using "all instruments of our national power - military, economic and diplomatic" - to deter Syria from again using chemical weapons. And he said the US would "sustain" this effort for as long as it takes.
Two days later, Macron said France had persuaded Trump to stay in Syria and launch the air strikes. "Ten days ago, President Trump wanted to withdraw from Syria. We convinced him to remain," the French president said.
In responding to Macron's comments, the White House stressed that Trump's plans had not changed and he still wanted US forces to "come home as quickly as possible."
On Tuesday Trump seemed to step even further away from his March remarks. After saying he would "love to get out" of Syria, and claiming the US had "done a big favour" for Iraq and other countries in Syria's neighbourhood by hammering IS, Trump said he and Macron discussed the downside of leaving.
"Emmanuel and myself have discussed the fact that we don't want to give Iran open season to the Mediterranean, especially since we really control it," Trump said.
His comment echoed a concern shared by others, including Defence Secretary Jim Mattis, that withdrawing from Syria now, while Syria's political crisis is unresolved, would cede ground to Iran and enable its ambition to establish an overland pathway to the Mediterranean through Iraq and Syria.