President Trump’s defeat of Islamic State as a territorial power was a major foreign-policy success, yet he may now undo it with a retreat from Syria that will also signal to U.S. allies that the White House can’t be trusted.

That’s the risk of Mr. Trump’s abrupt decision late Sunday to abandon northern Syria to Turkey. Washington and Ankara had been negotiating to create a buffer zone to avoid a conflict there, but on Sunday the White House announced that American forces will cede the area to Turkish troops. Turkish President...