Friday night’s failed coup was Turkey’s last hope to stop the Islamization of its government and the degradation of its society. Reflexively, Western leaders rushed to condemn a coup attempt they refused to understand. Their reward will be a toxic Islamist regime at the gates of Europe.

Our leaders no longer do their basic homework.The media relies on experts-by-Wikipedia. Except for PC platitudes, our schools ignore the world beyond our shores. Deluged with unreliable information, citizens succumb to the new superstitions of the digital age.

So a great country is destroyed by Islamist hardliners before our eyes—and our president praises its “democracy.”

That tragically failed coup was a forlorn hope, not an attempt to take over a country. Turkey is not a banana republic in which the military grasps the reins for its own profit. For almost a century, the Turkish armed forces have been the guardians of the country’s secular constitution. Most recently, coups in 1960, 1971 and 1980 (with “non-coup” pressure in 1997) saw the military intervene to prevent the country’s collapse.

Erdogan will use the coup as an excuse to accelerate the Islamization of his country and to lead Turkey deeper into the darkness engulfing the Muslim world. His vision is one of a neo-Ottoman megalomaniac.

Each time, the military returned the government to civilian rule as soon as that proved practical. My own first experience of Turkey came just before the 1980 coup. Turkey was broke and broken. The economy was in such a shambles that you could not buy a cup of Turkish coffee in Istanbul. I walked because taxis and public transportation had no fuel. Murderous political violence raged. Reluctantly, the generals stepped in and saved their country.

Friday night, mid-grade officers led a desperate effort to rescue their country again. They failed. The West cheered. Soon enough, we’ll mourn.

The coup leaders made disastrous mistakes, the worst of which was to imagine that the absence of President Erdogan from Ankara, the capital, presented the perfect opportunity. Wrong. In a coup, the key is to seize the leaders you mean to overthrow (as well as control of the media). Instead of fleeing into exile, Erdogan was able to return in triumph.

So who is the man our own president rushed to support because he was “democratically elected?” Recep Tayyip Erdogan is openly Islamist and affiliated with the Muslim Brotherhood, which President Obama appears to believe represents the best hope for the Middle East. But the difference between ISIS, Al Qaeda and the Muslim Brotherhood isn’t one of purpose, but merely of manners: Muslim Brothers wash the blood off their hands before they sit down to dinner with their dupes.

With barely a murmured “Tut-tut!” from Western leaders, Erdogan has dismantled Turkey’s secular constitution (which the military is duty-bound to protect). His “democracy” resembles Putin’s, not ours. Key opposition figures have been driven into exile or banned. Opposition parties have been suppressed. Recent elections have not been held so much as staged. And Erdogan has torn the fresh scab from the Kurdish wound, fostering civil war in Turkey’s southeast for his own political advantage.

Erdogan has packed Turkey’s courts with Islamists. He appointed pliant, pro-Islamist generals and admirals, while staging show trials of those of whom he wished to rid the country. He has de facto, if not yet de jure, curtailed women’s freedoms. He dissolved the wall between mosque and state (Friday night, he used mosques’ loudspeakers to call his supporters into the streets). Not least, he had long allowed foreign fighters to transit Turkey to join ISIS and has aggressively backed other extremists whom he believed he could manage.

And his diplomatic extortion racket has degraded our own military efforts against ISIS.

That’s the man President Obama supports.

And the leaders of the ill-fated coup? What did they stand for? Mustafa Kemal Ataturk’s legacy and a secular constitution. One of the great men of the last century, Ataturk (an innovative general by background) pulled Turkey from the wreckage of World War One, abolished the caliphate, suppressed fanatical religious orders, gave women legal rights and social protections, banned the veil, promoted secular education for all citizens of Turkey, strongly advocated Westernization and modernization…and promoted a democratic future.

The officers who led the collapsed coup stood for all those things. President Obama and Secretary of State Kerry opposed them.

By Saturday morning, it was clear that the mullahs and mobs behind Erdogan had won. Erdogan will use the coup as an excuse to accelerate the Islamization of his country and to lead Turkey deeper into the darkness engulfing the Muslim world. His vision is one of a neo-Ottoman megalomaniac.

NATO, which operates by consensus, will find itself embracing a poisonous snake. New crises will reawaken old fears in southeastern Europe, which western European states will dismiss condescendingly, further crippling the badly limping European Union. Syria will continue to bleed. And educated, secular Turks will find themselves in a situation like unto that of German liberals in the 1930s. We may see new and unexpected wars.

A desperate, ill-planned coup has failed in Turkey. Here comes the darkness.