This country’s national security decision-making process is more broken than at any time since the National Security Act became law in 1947. Nothing illustrates this dangerous dysfunction more starkly than President Trump’s reckless, unilateral decisions to announce the sudden withdrawal of all 2,000 United States troops from Syria and to remove 7,000 from Afghanistan.

These decisions went against the advice of the president’s top advisers, blindsided our allies and Congress, and delivered early Christmas presents to our adversaries from Russia and Iran to Hezbollah and the Taliban. The costs of this chaos are enormous, starting with the blunt, unnerving resignation of Defense Secretary Jim Mattis, one of the last senior administration officials committed to preserving American global leadership and alliances.

In a stunning tweet Wednesday, Mr. Trump declared the Islamic State defeated and promised the rapid return of all United States forces from Syria. In fact, the Islamic State is not defeated, though it is greatly weakened. The Pentagon estimates that 2,000 to 2,500 fighters continue to control territory in southeastern Syria, while tens of thousands more remain throughout Syria and Iraq. Although many militants have melted back into the population, they can re-emerge, as we saw after the American withdrawal from Iraq in 2011. Stabilizing the areas liberated from the Islamic State to prevent its revival remains as important as ever.

Cutting and running from Syria benefits only militants, Turkey, President Bashar al-Assad of Syria, Russia and Iran. We are abandoning our Kurdish partners, leaving them vulnerable to Turkey’s offensive, after they did the hard work of undermining the Islamic State.