As late as Monday, James Jeffrey, the State Department’s Syria envoy, told the Atlantic Council that the United States would stay in Syria until ISIS was defeated, Iranian influence was curbed and there was a political solution to the Syrian civil war.

But on Wednesday, Mr. Trump undercut his advisers, and American interests, by reversing course and declaring in a tweet, “We have defeated ISIS in Syria, my only reason for being there during the Trump Presidency.”

There was no attempt to use the leverage of an American withdrawal to achieve any specific political or military goal.

Mr. Trump’s assertion that the Islamic State is defeated is absurd. “We have won against ISIS,” he boasted in a video. The ability of the terrorists to strike has been significantly degraded and much of the territory they claimed for their so-called caliphate has been liberated. But the group still retains a pocket of land on the Syria-Iraq border and has roughly 20,000 to 30,000 fighters, according to military researchers. As Mr. Jeffrey said Monday, “The job is not yet done.”

No one wants American troops deployed in a war zone longer than necessary. But there is no indication that Mr. Trump has thought through the consequences of a precipitous withdrawal, including allowing ISIS forces to regroup and create another crisis that would draw the United States back into the region.

An American withdrawal would also be a gift to Vladimir Putin, the Russian leader, who has been working hard to supplant American influence in the region and who, on Thursday, enthusiastically welcomed the decision, saying, “Donald’s right.” Another beneficiary is Iran, which has also expanded its regional footprint. It would certainly make it harder for the Trump administration to implement its policy of ratcheting up what it calls “maximum pressure” on Iran.

Among the biggest losers are likely to be the Kurdish troops that the United States has equipped and relied on to fight the Islamic State in Iraq and Syria. Turkey’s president, Recep Tayyip Erdogan, considers many of the Kurds to be terrorists bent on destroying his country. In recent days he has vowed to launch a new offensive against them in the Syrian border region. Mr. Trump discussed his withdrawal decision in a telephone call with Mr. Erdogan on Friday.