The jailing of hundreds of army officers accused of plotting a coup against the government of prime minister Tayyip Erdogan marks a low-point for Turkey's military, which for decades exercised shadowy control over the country with scant regard for democratic values. But the outcome of the so-called Sledgehammer (Balyoz) case highlights a new worry: that Erdogan, in power since 2002 and with his eye on a revamped, executive presidency, is becoming just as authoritarian and over-bearing as the generals once were.

It is possible to view the Sledgehammer trial, and two similar plot investigations (known as Ergenekon and KCK) also involving hundreds of suspects, as an overdue, even praiseworthy attempt to clean house. Turkey endured three outright military coups between 1960 and 1980, and a moderate Islamist government, a forerunner to the ruling Justice and Development party (AKP), was forced from office in 1997. Tensions between the AKP and the military, proud guardians of Kemal Atatürk's secularist legacy, were at times acute. It is not difficult to imagine the generals wanted rid of Erdogan.

While expressing concern at the verdicts, Hürriyet commentator Mehmet Ali Birand said he was pleased that "the process of relieving our country from its historical 'military tutelage' has begun". He went on: "We lived under this tutelage for years... It took a huge toll on this country. Democracy was killed, freedom restricted, political life ruined and the Kurdish issue escalated ... Even if there was no concrete coup preparation in the Balyoz case, I'm sure there was the idea in many minds that if necessary a coup could be staged."

Sledgehammer may be viewed, alternatively, in a different light entirely – as a scandalously unjust proceeding akin to the notorious show trials mounted in the Soviet Union and its eastern European satellites during the cold war. "This case has little to do with justice or advancing Turkish democracy and everything to do with settling old scores," wrote columnist Semih Idiz. "It will be Turkey that loses out in the end because this case has merely contributed to deepening the divisions in society and adding to the polarisation between Kemalists and Islamists.… It has also damaged confidence among Turks in their legal system, even though this confidence was never very high to begin with."

Perhaps the Sledgehammer saga is best understood as neither a triumph for justice nor a democratic disgrace, but an intrinsically political proceeding. In this sense, it is a natural by-product of Erdogan's forceful and sometimes painful attempt to turn Turkey into a modern nation state while fully recognising its religious identity. Turkey's economy has expanded prodigiously in recent years while its regional standing has greatly improved, albeit unevenly, in terms of the Middle East and Europe. At the same time, Erdogan has relaxed religious curbs, for example allowing women more freedom to wear a headscarf, and has attempted (so far without success) to answer the perennial Kurdish question.

These upheavals have come at a high cost in terms of internal divisions and recriminations. The justice system is but one casualty. There are many others. It seems no coincidence that many of the soldiers, politicians, Kurdish activists, lawyers, academics and journalists caught up in the Sledgehammer and other mass investigations are also Erdogan's opponents and critics. Their silencing, justified or not, will undoubtedly help him maintain his grip on power, and could yet ease his way into a powerful executive presidency via a rewritten constitution.

"Turkey's courts have been working overtime to throw government opponents of all political stripes behind bars," said Dani Rodrik, a Harvard professor who is a son-in-law of one of Sledgehammer's most prominent defendants, General Cetin Dogan. Rodrik said key evidence in the Sledgehammer case was forged and all the trials reeked of political interference. "In separate cases, thousands of Kurdish politicians and activists are on trial – nearly 1,000 among them detained – for alleged links with terrorist activities. Turkey holds more journalists in jail than China and Iran combined ... I hope that the world will more closely focus on the gross miscarriage of justice taking place in Turkey. While Turkey touts itself as a leader of democratic freedoms in the Middle East, its actions in this and similar cases indicate otherwise."

Erdogan has grown increasingly confident, some say arrogant, during his decade in power, and there is much speculation as to what will come next. Under a new law passed by the AKP, Turks will choose their first directly elected president in 2014. The current president, Abdullah Gul, is a long-time Erdogan associate who owes his post to the prime minister. Under the 2012 law, Gul is specifically barred from standing again, while the prime minister can stand without first resigning. Many Turks suspect that, Putin-style, Erdogan will simply swap jobs. In an interview published last week, he clearly indicated his willingness to stand. The people, he said, only had to ask.