Five days after hearing their mission might end abruptly, the U.S. commanders and troops who have been fighting ISIS in Syria got a new message from their commander in chief: their mission will continue indefinitely.

President Donald Trump decided to keep the fight going, his spokeswoman said in a brief statement Wednesday morning, but he has reportedly asked the Defense Department to develop plans for a way out, as conditions allow.

“The military mission to eradicate ISIS in Syria is coming to a rapid end, with ISIS being almost completely destroyed,” Sarah Huckabee Sanders said in a press release. “The United States and our partners remain committed to eliminating the small ISIS presence in Syria that our forces have not already eradicated.”

The White House sought to end speculation that a total withdrawal was in the works after Trump — seemingly off-script — said last Thursday that the U.S. troops in Syria would be coming home “very soon” and froze civilian-assistance funds. The moves left U.S. officials and allies holding their breath from Washington to Syria to U.S. Central Command headquarters in Tampa, Florida. Then on Tuesday, Trump told reporters at the White House that he intended to pull troops out of the war — at the exact moment that several of the top U.S. officials in charge of the American intervention were saying just the opposite at at a nearby Washington think tank. CENTCOM’s Gen. Joseph Votel, USAID’s Administrator Mark Green, and special envoy Brett McGurk, who were not responding directly to the president’s comment, said at the U.S. Institute of Peace that the U.S. should continue its mission to defeat ISIS and help rebuild Iraq and Syria.

“The hard part, I think, is in front of us — stabilizing these areas, consolidating our gains, getting people back into their homes, [and] addressing the long term issues of reconstruction and other things that will have to be done,” Votel said. “Of course, there is a military role in this. Certainly in the stabilization phase.”

As they spoke, Trump said at the White House he wanted “to get out.” He also said he may try to get Saudi Arabia to pay for the remaining counter-ISIS mission in exchange for keeping U.S. troops engaged.

“I want to bring our troops back home,” Trump said at a joint press conference with three Baltic heads of state. “It’s time. We were very successful against ISIS, we will be successful against anybody militarily. But sometimes it is time to come back home. And we are thinking about that very seriously.”

The president appears to have changed his mind between his Tuesday press appearance and meeting with members of his national security team later that day. Instead, he reportedly told the Pentagon to start planning for a withdrawal, but did not set a deadline.

“We had a significant discussion about that yesterday,” Director of National Intelligence Dan Coats told a group of defense reporters on Wednesday. “I can’t go into detail about what was decided on yesterday with our national security team and the president, but there will be released a statement shortly relative to the decision that was made on that topic."

The White House released its statement hours later. Sanders said, “We will continue to consult with our allies and friends regarding future plans,” but did not address Trump’s proposed Saudi shakedown. Nor did her statement mention Trump’s freeze of $200 million in non-military assistance for Syria.

At Wednesday’s press conference, Sanders said the White House was not going to commit to “arbitrary timelines.” When will they know ISIS is eradicated? “That determination will be made by the Department of Defense and the secretary of defense.” In the meantime the U.S. will continue training local partner forces and preventing any re-emergence of ISIS, she said.

Advocates for U.S. military, humanitarian, and reconstruction intervention warned Washington this week against walking away from Syria too soon. A sudden, unexplained withdrawal “would send a frightening message” to the region, said Bayan Sami Abdul Rahman, the Kurdistan Regional Government’s representative to the U.S., at Tuesday’s think tank event.

It could also risk second- and third-order effects that would undermine several of the Trump administration’s other foreign policy goals, like countering Iran’s influence in the region, said Alireza Nader, a consultant affiliated with RAND Corporation. “If the U.S. withdraws from Iraq and Syria, it will just make the problems worse,” he said. “The rivalry between Iran and Saudi Arabia is going to heat up. There might be a military conflict between Iran and Israel...If the U.S. really wants to counter Iran in the region, it has to stay in Syria.”

Others were cautious about ignoring public opinion or avoiding finding a long-term way out of the war.

“Leaving U.S. forces there for a ‘short term’ is a compromise but those who guess we'll stay long-term may want to re-think,” said Amb. Robert Ford, former U.S. ambassador to Syria. “Trump will remember the applause he heard at the Ohio rally when he said he'd pull the forces back out. In my own travels around the U.S., speaking about Syria, I've yet to meet any audience anywhere that wants us to get more involved in the Syrian civil war.”

“We already are seeing mission creep with our forces in Syria, who are not just lined up against ISIS. They're pointing weapons to deter Turkey, an ostensible NATO ally fighting for control of non-ISIS held territory in northern Syria against a Syrian-Kurdish faction we help,” said Ford, now a fellow at Yale University and the Middle East Institute. “In addition, we've bombed Syrian government and pro-government forces trying to retake a gasfield held by our Syrian Kurdish faction allies — no ISIS involvement in either of these cases. Instead, we're getting more involved in the broader civil war.”

The mission confusion from the president has frustrated elite special operations forces on the ground and development advocates in Washington.

“Since 9/11, the rallying cry of our military leaders has always been that if we leave behind a vacuum, then the bad guys will fill the void. With the fall of ISIS in Raqqa and Mosul, America’s investments in civilian stabilization programs must be non-negotiable,” said Liz Schrayer, president and CEO of the U.S. Global Leadership Coalition.

“The fight against ISIS in Iraq and Syria is far from over,” said the Middle East Institute’s Charles Lister, senior fellow and director of counter-extremism and counterterrorism. “Even in Iraq, where we’ve called ‘job done,’ ISIS is on its path to recovery already. In Syria, at least 2,000 ISIS militants remain active and on the frontlines in coalition areas of operation, and yet our ground war is virtually at a standstill due to complications with the Turks. ‘Defeating’ ISIS is also probably an unattainable objective, but degrading it to such a point that it becomes more manageable to local actors will still require a substantial final phase of military operations in Syria and then a more drawn out stabilization mission. In short: we’ve got a long way to go if we have any hope of truly ‘winning’ this fight. For now, the president looks determined to repeat the same mistake Obama made in prematurely withdrawing from Iraq, despite repeatedly saying he’d never consider doing such a thing.”

Patrick Tucker contributed to this report.