A Turkey-backed Syrian rebel fighter is seen in the town of Tal Abyad.Reuters

Updated at 9:50 a.m. EST on October 15, 2019

Yesterday saw multiple reports of jailbreaks from Kurdish-operated prisons and camps that contained ISIS supporters. The Kurds, now battered by the full force of a Turkish invasion approved by Donald Trump, have allocated resources away from prisons and to their own survival, which is threatened more acutely by the Turkish military than by the Islamic State. Kurds have fled, prisons have been left unattended, and ISIS members, including Europeans and other foreigners posing serious terrorist threats, have walked free or may walk free soon. ISIS propaganda channels are gloating. The forces that defeated ISIS are scampering frantically around the desert, hunted like jackrabbits and desperate for protection, now that America has forsaken them.

Some have likened the mass release of ISIS members to the period in the early 2010s when ISIS busted Sunnis out of jails in Iraq, and many joined the group in search of protection. But the comparison does not do justice to the ludicrous follies and entirely predictable consequences of the last week. More apt might be the climactic scene of the 1984 movie Ghostbusters, in which an orange-haired government employee (William Atherton) defies all logic and expert advice, and directly causes the release of thousands of supernatural ghouls onto the streets of Manhattan. That Walpurgisnacht could have been prevented indefinitely just by letting the Ghostbusters keep doing what they had been doing. No sane person would have ordered the demons freed, but no sane person was present to countermand the order.

The best one could say about America’s abandonment of the Kurds is that they should have known we would sell them out eventually. (Patrick Cockburn quotes a new Middle Eastern proverb: “Never get into a well with an American rope.”) Turkey told us repeatedly that it would not accept a Kurdish state run by partisans of the Kurdistan Workers’ Party (PKK), which has run a guerrilla war against Turkey, with pauses, since 1984. (See here an extraordinarily forthright admission that the PKK’s rebranding as the Syrian Defense Forces was merely cosmetic.) To some extent, the Obama administration deserves criticism for resting the fight against the Islamic State on an alliance it knew would lead inexorably to either a total renegotiation of our relationship with Turkey or betrayal of the Kurds in Syria. That reckoning has come, and it is totally in character for Trump to give up everything to Turkey (which hosts our military bases and nuclear weapons, and has the second-largest military in NATO) and betray the Kurds (to whom our only debts are moral).

But the whole point of being a superpower is that we get to take our reckonings at times of our choosing, and not in chaotic conditions unfavorable to our interests. The situation before Trump’s about-face was not what an economist would call a stable equilibrium—we needed to watch things carefully and nudge them now and then—but we could manage them. Turkey would almost certainly have continued tolerating an unofficial Kurdish state, as long as the U.S. continued to guarantee that it would not be used as a platform for attacking Turkey. Turkey would not have waited for permission to attack the Syrian Kurds if the U.S. didn’t have enough leverage to forestall such an attack.

Trump’s promise one week ago to remove U.S. soldiers from Syria, and clear the way for Turkey to invade and subdue our allies, amounted to a decision to hasten the reckoning and to force our debts to come due long before we had the resources to pay or refinance. Perhaps it was not ideal for the Ghostbusters to keep their ghosts imprisoned in a decrepit firehouse not built for that purpose. It is even less ideal simply to disgorge them into Tribeca.

What will happen now that the prisons are emptying and the Islamic State is newly flush with manpower? Many of the foreigners have reportedly been trying to return to their home countries; they came to Syria to live in a caliphate, and with ISIS now reduced to a guerrilla force, they might prefer to wait in, say, Brussels for ISIS to rebuild its paradise on earth. Others will probably stay in Syria and will seek out jihadist groups willing to take them in. They will be spoiled for choices, particularly if they can make it to northwest Syria, where Turkish-backed rebels and jihadist groups continue to flourish. The celebration in ISIS’s propaganda does not automatically mean that the group is resurgent. (A car bomb here and there does not a caliphate make.) But ISIS is an opportunistic infection, and the chaos of the moment leaves the group with an attractive opportunity.

The immediate victims of the Turkish invasion will, of course, be Kurds. Credible reports of war crimes have already come in. Expect more soon. Moreover, the stated goals of the Turkish invasion include what might generously be called an ethnic rearrangement, to isolate Kurds and allow non-Kurds sympathetic to Turkey to take their places.

The closest thing we have to a strategy document to guide us through this mess is a tweetstorm today from Trump. “Endless wars!” Trump wrote. “Others may want to come in and fight for” Turkey or the PKK, but the United States would rather let its erstwhile allies slaughter each other in single combat. It is difficult to exaggerate how shallow and optimistic this approach is. The United States will not be present to cut and broker deals with and between these parties, but Russia and Damascus are already there, bidding for influence now that the United States has left the auction. As American influence zeroes out, we will see what comes next. Already the Kurds have begun aligning with Damascus and, by extension, with Russia. Ghostbusters comparisons notwithstanding, America’s foreign policy in the region has long since ceased to be merely a comedy of errors and is veering into tragedy.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.