Editor’s Note: Frida Ghitis is a world affairs columnist for The Miami Herald and World Politics Review, and a former CNN producer and correspondent. Follow her @FridaGhitis. The opinions expressed in this commentary are hers.

Story highlights

Last Friday, a military faction in Turkey unsuccessfully tried to topple President Recep Tayip Erdogan

Frida Ghitis: Erdogan is waging a successful countercoup, but Turks passion for democracy may hinder his efforts

CNN  — 

Last Friday, a military faction in Turkey tried to topple President Recep Tayip Erdogan. The effort failed, but since then Erdogan has been leading his own coup, crushing the foundations of democracy and attempting to establish himself as the country’s authoritative ruler.

Right now, it appears his coup is succeeding.

Erdogan’s plan to use the military uprising as a pretense to cement his hold on power became clear when he declared the failed coup “a gift from God,” as he landed at Ataturk Airport early Saturday morning. Within hours of his arrival in Istanbul, the President moved to take control of the country and remake it to his liking.

Frida Ghitis

As loyal security forces rounded up suspected coup plotters, the government fired several members of the judiciary board, or HSYK, the entity that selects judges and prosecutors. Then the HSYK immediately fired 2,745 judges.

The crackdown unfolded so quickly and with so much specificity that many in Turkey began referring to the military insurrection as “coup theatre,” suggesting it was orchestrated by Erdogan himself.

Fethullah Gulen, the Turkish cleric who Erdogan blames for trying to topple his government, further promoted that idea. Gulen, once Erdogan’s ally and whose followers run a network of schools in Turkey and elsewhere, over the last few years has become a sharp critic of the President’s steady massing of power.

Erdogan consequently views Gulen and his millions of supporters as a grave threat. The aging cleric now lives in Pennsylvania and insists – as he did when the Friday coup was unfolding – that he opposes any military attempt to take power from the government. Meanwhile, Erdogan has asked the United States to extradite him.

While Gulen’s charge that Erdogan orchestrated the coup lacks much evidence, there is little doubt the President was preparing for a moment like this. How else could he explain the lists containing thousands of names of people who would be fired or imprisoned, including schoolteachers, education and finance ministry officials, and university deans? By now the government has detained, fired or suspended some 60,000 people.

But the President isn’t only attacking judges, teachers and government officials. The topography of this new repression is a road map to his ultimate goal of monopolizing power and moving the country in a more Islamist direction.

turkey erdogan interview becky anderson_00002423.jpg
Exclusive: Turkish president describes night of coup attempt
06:10 - Source: CNN

Erdogan seeks to become an omnipotent autocrat protected by popular support and a veneer of democracy – something along the lines of what President Vladimir Putin has achieved in Russia as an elected dictator. It is important for him to maintain a semblance of democratic legitimacy, and Erdogan has proven himself adept at doing so, accusing his critics of treason against the state and manipulating conflicts to win elections for his party, the AKP, or the Justice and Development Party.

Oddly, Erdogan, as President, should have reduced powers. After serving the maximum three terms as prime minister, he became President in 2014, a traditionally ceremonial post. And yet he has governed as if he never left the premiership. In fact, he now wants to amend the constitution to create a more powerful presidency. But before the legislature can even constitute such a change, Erdogan has set to work making his wish for expanded powers a palpable reality.

Although Turkey is formally a liberal democracy, with all manner of written commitments to the secular imperatives of separation between church and state, free press and free speech, Erdogan has launched a massive assault on the media and a muscular campaign to promote the government’s role in religious activities.

In 2012, Turkey became the world’s top jailer of journalists, ahead of China, Iran and other chronic abusers. It held the title for several years, and it still holds one of the worst records on imprisoning journalists, with its press ranked “Not Free” by Freedom House. Worse yet, the government routinely shuts down social media and the Internet. In fact, one of the early post-coup moves was to order the closure of more than 20 Internet news sites.

turkey attempted coup social media burke pkg_00001709.jpg
Internet slowed in early hours of Turkish coup attempt
02:26 - Source: CNN

But the most disturbing attack that Erdogan has waged post-coup has been on the education system. When the government announced it was revoking the teaching licenses of 21,000 private school teachers, firing over 1,000 university deans, ordering academics to cancel any foreign travel and cleaning out the education ministry of large numbers of bureaucrats, it was clear Erdogan was using the coup to advance agendas unrelated to democracy.

Turkish citizens have expressed alarm at Erdogan’s meddling with the education system, particularly his vow to “raise pious generations,” which has included plans to introduce mandatory Islam classes for elementary schools, adding religion classes for high school students and building 80 mosques in state universities.

Join us on Facebook.com/CNNOpinion.

All of which reinforces the idea that Erdogan is moving the country away from the strictly secular path carved by Turkey’s founder Kemal Ataturk after World War I. As the thousands of imprisoned alleged coup plotters await their fate, wondering if Erdogan will reinstate the death penalty and apply it retroactively, the rest of the country frets over how far he will push to consolidate power and undermine democracy.

On Thursday, Erdogan announced he has imposed a state of emergency for three months and suspended the European Convention on Human Rights. Now the President can rule by decree, bypassing parliament altogether and expanding the crackdown at will.

Whoever orchestrated the release of emails hacked from the Democratic Party computers knew exactly what they were doing. But while there’s no question the content of the emails matters, it’s worth widening the lens for some important and troubling context to the hack, context that points to outside interference from an outside power.

Frida Ghitis is a world affairs columnist for The Miami Herald and World Politics Review, and a former CNN producer and correspondent. Follow her @FridaGhitis. The opinions expressed in this commentary are hers.