I said last week that I thought things were inevitably destined to get uglier, and it seems that uglier has arrived. The latest from the AKP-Gülen fallout is that over 500 Turkish police officials and officers have been sacked, investigations have been launched into Prime Minister Erdoğan’s sons Bilal and Bürak along with the newly government-appointed Istanbul police chief, the chief prosecutor in the corruption case has publicly claimed that the government is obstructing his case by ordering the police not to arrest suspects and not to implement judicial decrees, and, in the biggest sign of just how much things have gone off the rails, Erdoğan last night replaced ten cabinet members at once. There is now no question left that this is the biggest crisis by far of the AKP’s time in power and that it overshadows Gezi by orders of magnitude.

If anyone still harbors any doubts that this is an AKP-Gülen fight, those doubts can be put to rest. After the initial arrests and announcements of corruption probes, Erdoğan purposely went after one of the Gülenists’ strongholds in replacing high-ranking police officials wholesale. What is now happening is a showdown between prosecutors, who are still largely Gülenist, and newly appointed police who refuse to carry out the prosecutors’ orders. Any semblance of impartiality and rule of law on either side has been completely thrown out, and Turkish institutions are being harmed in ways that will take years to overcome. When the courts and the police are being used to further nakedly political agendas, it is the first and easiest sign that Turkish democracy is as hollow as it has been since the military was openly running things. How this is going to eventually be sorted out I have no idea, but at this point neither side appears willing to back down and each day brings a new escalation.

Were this the only element to this, I’d put my money on Erdoğan emerging from this bloodied but still standing. However, the earth shattering cabinet shuffle, how it was done, and how Erdoğan assembled his new cabinet lead me to believe that the prime minister is in very serious trouble. In fact, this is the first time it has ever crossed my mind that his tenure as PM is legitimately in danger. First there is the fact that in the span of just a couple of days, Erdoğan went from denouncing any and all allegations of wrongdoing as a foreign plot to accepting the resignations of the three ministers he had been defending so wholeheartedly. Of the three, his closest ally was Erdoğan Bayraktar, who on his way out revealed that he was not resigning of his own free will but had been fired, and – this one is the real shocker – threw Erdoğan under the bus by alleging that any corruption in construction deals had been signed off on by Erdoğan and called on him to resign. For those of you who do not follow Turkey as obsessively as others, high level AKP officials simply do not publicly challenge Erdoğan like that. To put this in context, deputy PM Bülent Arınç made front-page headlines last month when he criticized Erdoğan’s stance on mixed-sex university housing and said that there was a contradiction between his own statements on the issue as the official government spokesman and the PM’s position. That was about the harshest public disagreement I can ever recall seeing between Erdoğan and one of his cabinet members or inner circle. Now, one of his closest cabinet allies has called on him to resign and implicitly accused him of wrongdoing. In addition, the previous interior minister, Idris Şahin, resigned from the party over the police purge and after accusing Erdoğan of allowing a small oligarchy to run the party. While this might be sour grapes due to his being replaced in the last cabinet shuffle earlier this year, it is still another crack in what up until now has been an impenetrable dam. Bayraktar made his comments during a live interview on NTV, which tried to cut him off and then later edited the interview clip on its website and during subsequent airings on television so that Bayraktar’s comments about Erdoğan were absent. That Turkish cabinet ministers now have to be censored because of comments they have made about the prime minister, and particularly when it is a minister known to be close to him, is one sign that the AKP is right now floundering around without much of an idea how to right itself.

Another sign is that it wasn’t just the three ministers whose sons have been implication in corruption who were shown the door. Egemen Bağış, who was EU Affairs minister and who is one of Erdoğan’s closest confidantes and attack dogs, and who often provides a window through his comments into what the prime minister is actually thinking, was removed as well, which to me is the most illuminating part of this entire episode. There have been rumors floating around about Bağış’s role in the scandal and about videotapes of him accepting seven figure bribes, but jettisoning him under pressure is still a remarkable move given his proximity to the prime minister. Furthermore, the new cabinet ministers are only going to make the AKP’s political problem worse, because instead of appointing people who might be more conciliatory, Erdoğan appears to have doubled down in appointing close allies with not much political experience and who are known hardliners. As a representative example, new Interior Minister Efkan Ala is not a member of parliament but is rather one of Erdoğan’s political aides, and reportedly urged Erdoğan to crack down harder on Gezi protestors this summer, calling the Istanbul chief of police to cajole him to use greater force. This is the guy who is now going to be in charge of Turkish domestic security and dealing with unrest, which signals to me that Erdoğan is in full panic mode and not thinking clearly. Once the public becomes more involved in this ongoing saga, things are going to get even worse, and I fear that what we have seen so far is just the warmup act to much more unpleasantness ahead.

All the while, Erdoğan’s comments and the comments of those around him increasingly beggar belief. Whether it is veiled threats to expel the U.S. ambassador, the by now rote accusations of U.S. and Israeli perfidy, the denunciation of foreign plots, Erdoğan’s claiming that photos of ministers accepting bags from businessmen implicated in the corruption scandal could be bags of books or chocolate rather than money (yes, he really said both of those things), Ahmet Davutoğlu’s tired refrain that this is all resulting from the jealousy of unnamed foreign countries determined to keep the new Turkey down…does any of this sound like it is coming from a government that has things under control? Let’s also keep in mind that this is all going down before large-scale or widespread public protests have broken out, and if Erdoğan already felt so much pressure that he was backed into turning over his cabinet in the middle of the night, just think about what will happen once real mass public pressure begins to bubble up. The AKP is shockingly off-message and has gone into full-blown populism mode, but with everything that has gone on and the implicit acknowledgement with the cabinet shuffle that all is not right, I think that Erdoğan might actually have suffered a fatal political wound. If the AKP does worse than expected in the local elections in March, which is a very likely possibility, it seems to me that Erdoğan’s aura of invincibility and stranglehold on his party will be permanently broken. Once that happens the long knives are bound to come out, and with the perfectly acceptable alternative of Abdullah Gül waiting in the wings, Erdoğan’s tenure as the sun around which Turkish politics revolves (to quote my friend Steven Cook) may be done. While I have learned enough to know that Erdoğan should never, ever be counted out or underestimated, we may have finally arrived at the exception to this longstanding rule of Turkish politics.