On July 15 Turkey commemorated the first anniversary of the 2016 failed military coup with a great deal of pomp, grandeur and public rallies in the major cities. President Erdogan spoke at rallies in Ankara and Istanbul where he indicated that the crackdown against the alleged plotters of the coup that has put thousands—including academics, journalists and civil servants—in jail would continue. He added a religious dimension to his condemnation by referring to those behind the coup as “unbelievers.”

Despite the fact that a year has passed since the coup, the government has not been able to give a satisfactory explanation as to why it was staged and who staged it. The followers of exiled cleric Fethullah Gülen are accused of staging the coup but without much concrete proof of their motives and actions. This has led to much speculation in Turkey and abroad as to the identify of the real perpetrators of the coup. Reports that Hakan Fidan, the head of Turkish intelligence, and Gen. Hulusi Akar, the army chief, both knew about the coup hours before it happened but did nothing to stop it have strengthened the feeling that there was more to the coup than meets the eye. Such speculations, which the government has not been able to refute with any credibility, have led the leader of the Republican People’s Party (CHP), Kemal Kılıçdaroğlu, to term it a “controlled coup.” The term implies that Erdogan ordered the coup in order to provide himself with an excuse to crack down on his opponents and concentrate even more power in his hands.

The reality within Turkey is far grimmer than that suggested by the festive atmosphere in Istanbul and Ankara on the anniversary of the failed coup. In fact, it is reminiscent of the state of affairs in Turkey in 1980, just before the military coup that year. The nation is divided right down the middle and there is no possibility of dialogue given President Erdogan’s increasingly authoritarian actions. The division within Turkey was demonstrated dramatically in the result of the referendum held in April, which aimed to change the Turkish political system to a presidential one with much of the power concentrated in the presidency. Erdogan and the Justice and Development Party, also known as AKP, campaigned strongly for a yes vote with the opposition denied access to most of the media outlets to put forward their point of view. Despite this lopsided campaigning, Erdogan was able to win the referendum with the slimmest of margins in the process, losing Turkey’s three largest cities—Istanbul, Ankara and Izmir.

However, the lessons of this near-loss were not reflected in the policies or rhetoric of a president who continues to pursue a hard line against all opponents by putting dissidents in jail and/or branding them as “traitors.”

The recent Gandhi-like “March for Justice” from Ankara to Istanbul, led by Kemal Kılıçdaroğlu, the leader of the largest opposition party, gathered support from tens of thousands of people. They marched with him in defense of democracy and as a warning to Erdogan’s dictatorial policies, which is a clear indication—if one was needed—about the glaring division within the Turkish polity. The march ended in a massive rally in Istanbul and was attended by more than a million people, a clear sign that Erdogan is losing more and more support in the city where he started his political career. This division in Turkish society is very much a rerun of 1980 when a similar stark division between the right and the left prevailed in the country and provided an excuse for the military to take over. Although no two situations separated by decades in time can ever be the same, the parallels are too uncanny to miss.

Furthermore, as in 1980, acts of terrorism in Turkey have soared, creating a major law-and-order issue, if not indicating the total breakdown of law and order. Terrorist attacks—mostly blamed on ISIS and Kurdish separatists—have increased in geometric proportions since the middle of 2015. Much of this has been brought on by the government’s actions. Ankara’s decision to get involved in the Syrian civil war has brought its own blowback, attracting to Turkey terrorists with grudges against Turkish policies and millions of refugees. I argued in the Guardian in 2012 that Turkish policies toward Syria would generate the type of blowback that Pakistan experienced when it became involved in the Afghan civil conflict decades ago. Unfortunately, this prediction has come to pass—and with a vengeance.

In addition to its involvement in the Syrian quagmire, the Turkish government radically changed its policy toward the peace process with the Kurds following the June 2015 parliamentary elections, which is when the AKP lost the majority thanks to the emergence of a moderate Kurdish party that won eighty seats. Erdogan’s decision to walk back from negotiations with the Kurds was prompted by his desire to punish the Kurds for the AKP’s loss. However, this has led to a major spurt in Kurdish terrorism, which has made the terrorism problem in Turkey even more acute. At the same time, Ankara has launched an undiscriminating war against Kurdish areas and Kurdish political activists of all hues, which has made the situation infinitely worse both for the Kurds and for the Turkish state. The government’s inability to control and respond adequately to the twin terror threats from ISIS and PKK has undermined its legitimacy and, as in 1980, may well provide the armed forces an excuse to move in and fill the vacuum.

But what about the military itself? Today’s Turkish military has greatly changed when compared to the 1980s or even the 1990s. After coming to power in 2002, the AKP launched a concerted campaign to “defang” the military and curb its political ambitions. Its moves included the prosecution of hundreds of senior officers for plotting to overthrow the duly constituted government. The Ergenekon and Sledgehammer cases led to the indictment and incarceration of many senior active-duty generals, retired generals and colonels between 2010 and 2012. It seemed the military had been permanently tamed.

However, beginning in 2013 the equation between the Erdogan government and the military high command has changed, making the former more dependent on the latter. This is the result of Erdogan falling out with his Islamist allies, known as the Gulen movement. The latter had provided much of the brain power in the police and judiciary that had been active in indicting the generals. Once the Gulenists fell out of favor with Erdogan and many of them—judges and high-ranking police officials in particular—were removed from their posts, the cases against the alleged military plotters were allowed to collapse. Part of this was deliberately engineered by Erdogan, who needed the military high command’s support against his former allies. Most of the officers indicted in the Ergenekon and Sledgehammer cases were freed. The government argued that Gulenist police officers and judges had deliberately manufactured evidence against the innocent officers. Some of those officers were reinstated and given the express task of rooting out Gulenist elements within the military and civilian government.

As a result of this partial reconciliation between Erdogan and the military high command, the latter has largely stood by him so far—as was witnessed during the abortive coup of 2016. However, this alliance appears to be a marriage of convenience aimed at exterminating all traces of Gulenist influence in the governmental apparatus. This task is almost over. Moreover, despite the purges in the ranks of the officer corps since the AKP came to power, a large segment of the military top brass is averse to Erdogan’s Islamist leanings because it considers itself to be the guardian of the Kemalist ideology and secular state. The government’s decision in February 2017 to remove the ban that prevented women officers in the military from wearing headscarves has roiled the officer corps. It has also led to criticism of the chief of staff for not opposing the decision, which runs directly counter to the Turkish military’s secular culture.

One can also assume that the military, having once again tasted political power, even if indirectly, will be extremely reluctant to give up its new-found clout in the political system. Efforts by Erdogan to reduce the military’s influence could very well bring a backlash. After all, Turkish society is split down the middle, the country’s economy is in trouble, the value of the lira has drastically decreased when compared to foreign currencies, and increasingly overt political dissent is evident on the streets. These rising issues may tempt the military to seize power, as it was tempted to do so in 1980. Only next time it may execute a coup more skillfully than the failed attempt made by rogue elements in 2016. This may or may not happen, but if it does Erdogan will have no one except himself to blame.

Mohammed Ayoob is a senior fellow at the Center for Global Policy and the University Distinguished Professor Emeritus of International Relations at Michigan State University.