Turkey has become a banana republic. It may sound harsh, but events of the last few days simply underline the point. When the Justice and Development Party (AKP) swept to power in November 2002, it promised clean government and democratic reform. The election of Recep Tayyip Erdoğan to the premiership made a mockery of that promise, since the AKP leader had more than a dozen corruption cases pending against him, cases immediately suspended because of parliamentary immunity. Other senior AKP officials—Cuneyt Zapsu, Egemin Bağış (a contender to replace Namık Tan as ambassador early next year) among others—were accused even by AKP associates of corruption, according to U.S. documents published by WikiLeaks. All, however, like Erdoğan himself profited nicely in the new order.

The democratic reform rhetoric also turned out to be a joke played out both on the Turkish public and well-meaning American diplomats. Erdoğan consolidated his power and used it arbitrarily to target his opponents. He entered a marriage of convenience with Fethullah Gülen’s movement, an Islamist movement which had itself consolidated control over the security forces. These he used to great effect, targeting and arresting opponents, many of whom languished for years in prison without trial. Erdoğan and his allies then tried his opponents on fantastical conspiracies utilizing evidence which outside experts deemed anachronous and clearly fabricated. Never mind justice, Erdoğan and his sympathizers figured: the ends justify the means.

Alas, like so many tyrants before him, Erdoğan is now learning that what goes around comes around. After picking a fight with the Gülen movement by seeking the closure of its lucrative exam prep schools, Erdoğan and his allies found themselves on the opposite end of the Gülen-controlled security forces, who arrested family members of several AKP ministers, as well as prominent AKP supporters on charges of corruption. Erdoğan is now crying foul, but he wins little sympathy after engaging in the same shenanigans. The prime minister eviscerated the independence of the judiciary, and now he cries that it has fallen under a rival’s control.

Events in Turkey now are incredibly important. There is a real race for the mayor in Istanbul; if the opposition wins—the polls show the two candidates are neck-and-neck—then Turks will conclude that Erdoğan is vulnerable. The arrest of the prime minister’s allies simply underscores how the situation has changed since Erdoğan attacked his own people during this summer’s Gezi protests. Erdoğan may once have seen himself as invincible, a cross between Ottoman Sultan Selim and Russian President Vladimir Putin, but as events unfold, the notion that Erdoğan will himself end his career in prison or in exile in Saudi Arabia a few years down the road becomes a welcome possibility. Let us just hope his successor will break Turkey’s tragic cycle and focus more on the future rather than on revenging past grievances.