The Turkish state changed hands a decade ago, when Islamic conservatives (supported by the liberals) prevailed in elections against the country’s old guard, the rightist nationalists known as Kemalists. It may be about to do so again. The conservative alliance of Prime Minister Recep Tayyip Erdogan’s Justice and Development Party (AKP) and the movement of Fethullah Gulen, a Muslim cleric who leads his congregation from self-imposed exile in the United States, has imploded. As it does, the military is gearing up to insert itself into politics once more.

The trouble started in 2011, when Erdogan decided to purge most Gulen supporters from the AKP party list ahead of the general election in June. No longer willing to share power with anyone else, Erdogan also ousted most liberals and supporters of the moderate President Abdullah Gül. Then, a subsequent reform of the public administration served as an excuse to remove many Gulenists from key bureaucratic posts.

The Gulenists’ response came in February 2012, when a prosecutor believed to be affiliated with the movement tried to summon Hakan Fidan, the head of the National Intelligence Organization and a close confidant of Erdogan, for questioning over his role in then-secret negotiations between the Turkish government and the Kurdistan Workers’ Party (PKK). The Gulenists had made their opposition to talks with the Kurdish movement known and wanted to derail them by charging Erdogan’s envoy -- and by implication the prime minister himself -- with treason.

Last summer, the rift between the two groups widened as protesters occupied Gezi Park. Gulen-affiliated media criticized Erdogan, comparing him to a “pharaoh.” The government, with its reputation tarnished and Gulenists gaining the upper hand, announced in late 2013 that it would shut down Gulen-operated schools. That would have deprived the movement of its main source of revenue and recruits. Not ready to take the hit lying down, the Gulen movement retaliated by supporting a corruption probe, led by the prosecutor Celal Kara, against relatives of several cabinet ministers and businessmen with close ties to the government. Upping the ante, Erdogan launched a full-scale purge of any suspected Gulen sympathizers from sensitive positions in the bureaucracy, judiciary, and police.

Gulen, of course, insists that he does not wield any power over state officials and claims that his only concern is for the public. Yet in an exceptionally fiery sermon last December, Gulen excoriated those “who turn a blind eye to the thief while punishing those who prosecute the thieves,” beseeching God to “consume their homes with fire, destroy their nests, break their accords.” Even Gulenists do not deny the existence of an informal network of devotees within the state. That was the bargain between the AKP and the Gulenists all along: In return for its support -- votes and the endorsement of the AKP by Gulenist media—the Gulen movement would get to staff the state bureaucracy. In fact, the AKP needed the Gulenists’ well-educated cadres to run Turkey, especially its police and judiciary. And since 2008, Gulenist sympathizers in the police and among prosecutors have helped put hundreds of regime opponents in prison.

Now, with the AKP-Gulenist relationship broken, Erdogan accuses his former allies of having established a parallel state that defies the authority of the elected government and of staging a coup against him. His most recent move against the so-called parallel state was his attempt last month to enact a law that would subordinate the judiciary to the executive, disabling his enemies from launching further probes. That will suit the Erdogan family just fine: A prosecutor tried to detain Erdogan’s son at the end of last year. The police, instructed by the government, refused to carry out the order, and the prosecutor was subsequently reassigned. More than 2,000 police officers and nearly 100 prosecutors have been reassigned since last December.

The conflict between Erdogan and the Gulen movement might sound quite byzantine. But remember that this is the land that gave us the term. Indeed, the dispute follows a historical pattern. The Ottoman Sultans feared autonomous powers such as religious congregations. Mehmet II, the conqueror of Constantinople, was particularly repressive; he curtailed economic freedoms in a bid to disempower religious fraternities. Kemal Atatürk, the founder of the republic, was obsessed with pacifying religious congregations, wanting to ensure that they could never rival the state. Turkish Foreign Minister Ahmet Davutoglu even defended the ongoing purges by pointing to history. Turkish state tradition, he said, includes the practice of “sacrificing sons for the state,” to eliminate potential rivals for the throne.

Now, leading commentators in the AKP’s media inform that the ruling party hopes to forge new alliances -- particularly with the military, its old enemy. But Erdogan should remember that turning to the military to help quash opposition is not risk-free. In 1971, conservative Prime Minister Süleyman Demirel solicited help from the military to quash the left, only to end up out of power. Erdogan has instructed the Ministry of Justice to prepare for a retrial of imprisoned military officers. The generals may very well be acquitted.

It is easy to see how this will play out. After several years of silence, the Turkish General Staff has once again taken to issuing political statements. The military high command has called the judiciary to task after Erdogan’s chief adviser confessed that several military officers had been convicted on trumped-up charges. It has demanded a retrial of the officers and issued sharp condemnations of critics. Many observers fear that the state’s institutional breakdown will invite the generals to intervene and “restore order,” as they have done so many times before. Stoking those fears: In a letter to a newspaper editor last month, Necdet Özel, the chief of the General Staff, wrote that ensuring the functioning of the parliamentary system has been “the basic principle” of the armed forces, stressing that the military is determined to uphold it because “we want peace in our country.” The statement begged the question of what the military will do if there is no peace in the country. Military interventions in the past have always been motivated by an alleged determination to ensure the preservation of democracy.

The return of the old military is not the only risk. There is also a new military to take into account. Since Islamic conservatives won control of the state apparatus and subdued the military in 2007 and 2008, purges from within the military of suspected Islamists -- which used to take place once a year -- have ceased. It may be inferred from this that there are now likely many within the military who sympathize with Gulen. His message, which combines Islam and Turkish patriotism particularly appeals to officers, who generally hail from conservative family backgrounds. And mass imprisonments of top generals, which have depleted the military’s upper ranks, have made it possible for younger officers to rise further and faster than ever. The Gulenist clout within the military might be considerable. Erdogan would hope that the top brass, to whom he now appeals, will succeed in keeping Gulenists among the lower ranks in check. But he must also fear a move against him by younger officers acting outside the chain of command. That was what happened in 1960, when the authoritarian Prime Minister Adnan Menderes was toppled.

Beyond that, the AKP-Gulenist backbiting represents a massive and collective failure of the Islamic conservative movement, from which none of its components may be able to recover. The corruption charges have deprived the AKP of any remaining moral authority. And the turf war has shattered the government’s reputation for managerial competence. The Gulenists have lost moral capital, too. The movement has always taken pains to show itself as standing above petty politics. But revelations of the extent of its power within the state undermine that point. The Gulenists have shaken Erdogan, but they may have also undone themselves. Their maneuvering does not inspire confidence in all of Turkey: According to a recent poll, only six percent of the public supports the Gulenists’ case against the AKP, whereas 28.5 percent supports the ruling party, and 45 percent thinks that both the AKP and the Gulenists are at fault.

Coalitions may come and go, but authoritarianism is forever -- or so it seems in Turkey. The Turkish Islamists’ failure as managers of the state will most likely catapult the traditional custodians of the state, the rightist nationalists in the military and the bureaucracy who enjoy a considerable following in society, back to power.