As the charred roof of Turkey’s Parliament building still smolders from the aerial bombardment unleashed upon it by the pro-coup air force, more lies in ashes than masonry work.

While the finer details of the bungled attempt to wrestle power from Turkish President Recep Tayyip Erdogan are still hazy, the implications going forward for Turkey, the greater Middle East, and the world couldn’t be clearer.

The story of the coup, when truncated, is a rather simple one. The military guardians of Turkey’s Kemalist tradition found themselves threatened by an Islamist political movement surging forward and continually undoing the “progress” of Turkish secularism.

Seeing that their society was showing all the signs of advanced onset Islamism, they decided to employ the traditional Turkish remedy: the putsch. However, unlike previous coups, this one appears to have failed on a spectacular level. Needless to say, those plotters not vainly seeking asylum in foreign countries are most likely in the process of signing confessions and naming whatever names the newly empowered Erdogan government instructs them to. The real story of the coup is more than just the obvious one of poor planning and failed execution. Rather, it is the tale of the last gasp of an exhausted ideology: Turkish secularism and the deep state that guarded it.

When Mustafa Kemal Ataturk first arrived on the Anatolian scene a hundred years ago, the Ottoman Empire, long the sick man of Europe, had finally decided to give up the ghost after enduring the brutality of World War I. Seizing the moment, Ataturk led an ingenious defense of what was left of the empire, and in the process, made himself into a legendary hero of the Turkish people. At the time, his reforms, which were imposed with an iron fist after the war, were sexy and innovative. Ataturk, like many other 20th century leaders, was able to impose modernity onto what had previously been an essentially medieval society. Secularism, it was thought, was the future and the new Turkish state would be on its cutting edge.

But like all ideological trophy wives, secularism has aged rather poorly since Ataturk ushered in its honeymoon phase. The days of the passionate embrace of a Turkish civic identity have faded, and discontent with the tedious status quo has grown like the waistlines of so many former Dallas Cowboys cheerleaders now hitting middle age.

Of course, in a technological sense, Turkey truly has become a modern nation. Glittering skyscrapers form the silhouette of Istanbul’s sprawling and ever-growing skyline. Its military is the largest and most advanced in the region, and its rulers have long set their sights on joining the EU. Western tourists (up until recently, of course) flocked in droves to the ancient ruins and exotic bazaars of the capital. They frolicked in the turquoise waters of Turkey’s Mediterranean beaches, whose beauty was outshone only by the advantageous exchange rate. But the more aware tourist could quickly find cracks in the seemingly Western-feeling facade.

Journey very far from the kitschy tourist traps of Sultanahmet or the hipster bars and nightclubs of Beyoğlu, and you’ll quickly feel more like you’re in Cairo than Berlin. Istanbul’s face may be worldly and lit by neon lights, but its soul is found in the song of the city’s thousands of minarets as they exude the call to prayer.

In truth, this had always been the case, but through the middle of the 20th century, the secularist narrative had the weight of inevitability on its side. Almost every Sunni power, with the notable exception of Saudi Arabia, was more or less openly secular. While many disagreed on the form secularism would take in the Sunni world, Baathist, Kemalist or Nasserite, the consensus still had an unshakeable faith in its inevitable triumph.

United by a shared hatred of Israel and suspicion of its western patrons, the Turkish and Arab regimes were able to maintain the status quo and channel the attentions and energies of the street, all while thwarting the growth of the inevitable Islamist weeds. Frequent Turkish coups and Arab massacres became little more than a regular and ritualized form of mowing the Islamist grass.

However, beginning with the 1973 Yom Kippur War and culminating with the Western-backed destruction of Baathist Iraq and Gaddafist Libya, the secularist narrative completely unraveled. The Arab Spring that initially excited the simple minds of The New York Times editorial board with visions of a liberal and democratic Middle East soon degenerated into the nightmarish reality of civil war and spreading Islamic radicalization.

The truth was that the for all the technological modernization imposed upon it by the secular dictators of the 20th century, the Sunni Muslims of the Middle East could never truly shake off the siren song of the glories of their Islamist past, which began to seem more and more appealing as the secular consensus crumbled before their eyes.

Put in this context, the failed Turkish coup can be understood as not only the last stand of the Turkish deep state but of the entire story of 20th century Sunni secularism itself. The Turkish military was already on its back foot after Erdogan’s purge of the top brass in 2011 allowed him to push ahead boldly with increasingly authoritarian and Islamist reforms. As they watched their Islamist foes encroach ever closer, no doubt the coup conspirators had concluded they were quickly approaching a “now or never” moment.

While their failure to capture or eliminate Erdogan and his prime minister was certainly the plotters’ cardinal error, their defeat was certain before the first shot had ever been fired. As footage of bewildered young soldiers meekly surrendering to mobs of pro-regime Turks began to circulate on social media, it became apparent that the coup planners’ blunders were more than just strategic. They found themselves unable to engender the respect and corresponding legitimacy which they had come to expect from Turkish citizens, while simultaneously remaining unwilling to instill the fear through brutal violence necessary in such an instance.

Like its Ottoman predecessor before it, the Kemalist tradition has been the sick man of ideology for some time now. The dreams of secularist glory, which enraptured the minds of so many young 20th century Sunnis, are now riven through with arthritis. They seem more at place gathering dust in a museum than inflaming passions in the street.

There is now no going back for the Turkish deep state, which will never recover from its humiliation. A vengeful Erdogan will purge every Kemalist in the military and civil service, as he fully exploits his newly found blank check to eliminate his political enemies. The Constitution will be rewritten, with the military forced to surrender all its previously enjoyed sovereignty to civilian command. Ataturk and his aspirations will be relegated to history books written by Islamists and will live on only in the fading memories of old men.

So ended the secularist dreams of the Kemalist deep state, whose people neither feared nor loved it, and for which its soldiers would neither kill nor die for. And so, like all the hollow men that came before it, it died with a whimper.