Not surprisingly, many Turks now feel that the social contract between the people and the government has been broken and there is no going back. Quite simply, the government has failed to protect them.

As a former member of the ruling Justice and Development Party, or A.K.P., who served in Parliament from 2007 to 2011 and was on the party’s executive committee, this has been a deeply disappointing process to watch. The A.K.P. was once the most progressive force in Turkish politics, but it has undergone a damaging transformation since the fateful Gezi Park protests of 2013.

Although I am a former air force officer and I believe strongly in the virtues of a secular state, I joined the A.K.P. in 2007 because I believed Turkey was at a critical juncture. I had little regard for the militant secularism and nationalism harbored by many within Turkey’s old establishment. The election of Abdullah Gul in 2007, who was almost blocked from becoming president because his wife wore a head scarf, was a critical moment for the consolidation of our democracy. By that time, the A.K.P. had already put Turkey into accession negotiations with the European Union, managed an impressive economic growth story and improved Turkey’s international standing. In many quarters, Turkey was seen as an inspiration for other Muslim countries.

It’s true that the A.K.P. was never a liberal party, but it had a clear interest in Turkey’s democratization. That’s why the party enjoyed support from democrats, liberals and some social democrats who were eager to balance the excesses of the stern old secularist regime. Both in Parliament and abroad we enjoyed the moral high ground of normalizing civil-military relations, overseeing a growing economy and obtaining greater democratic legitimacy through growing support from the electorate. I comforted myself in thinking that the European accession process would serve as an anchor if the A.K.P.’s conservatism ever pulled the country off course.

By 2009, the process had slowed down. Then, in September 2010, a referendum allowed Recep Tayyip Erdogan, then the prime minister and now the president, to shape the judiciary to his own liking. After that vote, he believed he had defeated the establishment for good. Regrettably, he came to the conclusion that he no longer needed the moderates in the party.