What is both the most disappointing and the most terrifying aspect of the events of the past two weeks in Syria is that absolutely everything that has happened there was entirely predictable, except for one element: the Americans’ blatant lack of anticipation and preparation, and the chaotic and improvised way in which they withdrew, which raises serious questions about the United States’ ability to face other major challenges on the international scene.

First, it was clear that Turkey would never accept either a de jure or de facto independent Kurdish state on its border. The government of Recip Tayyip Erdogan has always considered, and still sees, the Kurds as Turkey’s worst threat, far ahead of the armed Islamic State, which for Erdogan is a lesser evil.

When the Islamic State group attacked the Kurdish city of Kobani in 2014, and the U.N. and several observers expressed fears of genocide, the Turkish tanks stationed just over the border watched in silence, keeping their fingers crossed for an Islamic State group victory. According to some news reports, the pro-Turkish militias that are fighting the Kurds in Syria include former Islamic State group and al-Qaida soldiers.

It has now been years since Turkey threatened to invade northern Syria to exterminate Kurdish fighters, and the current invasion is in fact the third Turkish invasion in northern Syria, the two prior invasions having targeted the regions west of the Euphrates River.

Until now, the American military presence had prevented this third invasion from taking place, but it was clear that Erdogan would one day issue an ultimatum to the United States: You can be allied with the Kurds or with us, but not both, so choose. And it was clear that, when the day came, the United States would choose its NATO ally over its alliance with the Kurds in Syria, which it described as “temporary, transactional, and tactical.”

If there is any doubt about this, one can look at the American and Western reaction to the referendum and declaration of independence of the Kurds in Iraq, another ally in the fight against the Islamic State group. There was silence, even when Iran told the Kurds to retreat behind the lines that existed before the war against the Islamic State group and to forget their independence. The Kurds had to comply − Iraq and Iran were ready for war − but no one on the other side militarily supported a Kurdish state.

Panic

The Turkish invasion in northeastern Syria was only a matter of time. In fact, the White House statement following the call between Donald Trump and Erdogan stipulated that Turkey would proceed with “its long-planned operation into Northern Syria.”

So, if it was so predictable that this invasion would take place, and that the United States knew very well that it had been planned for a long time, how was it that the Americans were so ill-prepared, and that they retreated in such a chaotic way, under fire from Turkish forces? How could it be that American forces crossed Syrian soldiers coming to replace them, and that they bombed their own bases in Syria once they evacuated, and that having sharply criticized Turkey, the United States panicked upon realizing that Erdogan “held hostage” some 50 American nuclear bombs located in Turkish territory? Hadn’t the U.S. thought of this before?

Of course, the way in which Trump made his decision (impulsively and quickly during a telephone conversation, without consulting advisers) contributed significantly to the chaos. After all, he could have asked Erdogan to give him a week, in order to do things in a slightly more orderly way. But aside from President Trump’s impromptu action, shouldn’t the U.S. military be ready for all eventualities, especially ones that are highly probable and “long-planned”?

If the United States was not ready for this situation, will it be ready to handle other, less likely crises? If Russia were to send troops into eastern Ukraine or another European country, or if a conflict were to break out in Taiwan, would the United States and its NATO allies be better prepared, or would we see the same chaos and improvised response?

And shouldn’t the American government have predicted the coup and proactively found an alternative before the Turkish ultimatum arrived? For example, the United States could have negotiated with Russia for the creation of a federal state in Syria with some form of autonomy for the Kurdish region, but with a military presence from the Syrian regime at the borders. This would have ensured both the security of the Kurds and Syria’s territorial integrity.

The United States could also have proposed that the Kurds accept a certain number of Syrian refugees in their autonomous region in order to alleviate the burden on Turkey – where there are no fewer than 3.6 million refugees – in exchange for guarantees that Turkey wouldn’t invade.

There has not been, and there still is not, a good solution in Syria, but, knowing Turkey’s intentions to eliminate its Kurdish allies, the United States should have tried everything possible to find a tolerable solution for everyone. It had a duty to do this and failed at its task. This does not bode well, either for other U.S. allies or for global geopolitical stability.