(This analysis was written in 2016)

Turkish Islamists’ drama began at the start of the 20th century, like in many other predominantly Muslim countries. But Islamists of the former Ottoman Empire, and especially in the Republic of Turkey since 1923, have traveled a very specific road to arrive at today’s Erdogan regime.

The gradual downfall of the Ottoman Empire and the rise of Western powers, followed by the loss of vast lands of this last Islamic empire where the sultan was also the caliph of the state, was a big blow. The new Turkey was reduced to a sixth or less of its pre-17th-century size.

But not only that. The new system, a republic after the Western model, put an end to both caliphate and sultanate and declared a republican regime with state and religion not only independent from each other but with religion strictly following the state.

The alphabet was changed from Arabic-Persian to Latin. Clothing was Europeanized. Saturday and Sunday became the weekend instead of Thursday and Friday. It was forbidden for religious schools and religious courses to be outside of state control. All sheikhs and mullahs who wanted to continue teaching became state employees reporting to the government. Women were strongly encouraged to put aside Islamic clothing and to actively take part in social activities. Most religious sects and groups, as well as many mosques, were closed or became dysfunctional.

The new regime created a new “secular” elite — business people, bureaucrats, the military, with a new education system and a new view of history — and looked for a new place in the world community, one that was closer to the West and further from the Islamic world.

For nearly 80 years, those who were faithful Muslims — traditional and provincial — were looked down upon, pushed into isolation and poverty by the new elite in the major cities, especially Istanbul, Ankara, and Izmir — ironically called “the White Turks.”

The more they were ignored and pushed out, the more political they got.

They were mostly just the faithful in the early 20th century. They had widely become “Islamists” of different variations by 2000.

And they had dreams. Dreams to use the democracy to come to power, to put an end to the discrimination against the Muslim faithful; against women who just wanted to wear the hijab according to their beliefs without being thrown out of schools and universities; against men who wanted to wear beards and pray during work times without being laughed at.

They said they wanted peace and equal opportunities for all — regardless of their faith.

They opened schools and foundations. They increasingly found their way into the military, education, and justice systems — without making much noise about their beliefs and plans. They established television stations and newspapers. And they created political parties, which were closed and banned. Their newspapers and TV channels were also closed and banned.

But still, they kept going. They worked hard. Very hard.

People saw, enjoyed, and appreciated their work results — from city administrations to which they were first elected to the schools that they built and ran.

The more the “secular” system prevented them from growing, the more they cried foul and grew stronger.

In fact, many people outside of the Islamic sector supported them, from left-wing social democrats and Ataturkists (“Ataturkcu”) to all those “White Turks,” to secular Alevis and Kurds, to liberal and pro-republican journalists and judges.

The Justice and Development Party, or AKP, was born. It was 2001.

Just a year later, in 2002, it came to power — alone, in a fair-and-free election, and unlike past elections that produced impotent coalitions of the “unwilling.”

In its first years, things were going quite smoothly. Everybody was happy and thought the past was one-sided. Now, they thought, we will have a cohesive and inclusive Turkey, a more pluralistic system, looking more like Europe.

Even the secularists felt pleasantly proven wrong. “Why were we afraid of these people?” they thought.

And Western governments followed suit. The more good things, reforms, stability measures, and economic improvements the AKP governments demonstrated, the more eager were Western governments to embrace the new, pluralistic “Muslim conservative” Turkey.

And they kept being elected by big majorities.

But things started to change. Quite soon.

Unchecked Power

Islamic or not, unchecked power produces corruption. For a concrete example of this, look at Turkey’s ruling Justice and Development Party, or AKP, and the direction it took after its charismatic and iron-fisted leader, Recep Tayyip Erdogan, won parliamentary elections in 2002 with nearly two thirds of the seats.

The size of that electoral victory put an end to 40 years of paralyzed coalition governments, which had been unable to do anything substantial. The AKP’s success meant a one-party government could effectively take decisions and carry them out.

Inflation and the dysfunctionality of past governments were dealt with quickly and quite efficiently. The Kurdish insurgency did not end but Erdogan sent signals to Kurdish groups and the West that he was ready to reach a negotiated settlement. It was a time of confidential talks with Turkey’s Kurdistan Workers Party, or the PKK.

This organization has been named in Ankara and internationally as a terrorist grouping. Nonetheless, it is seemingly supported by many Kurds, even though it is the primary force behind the armed conflict in Turkey.

These negotiations produced an atmosphere of conciliation that created some breathing space — and optimism, which boosted stability. And all of this helped bring in increasing foreign capital and investment.

The government enacted liberal reforms. Concerns and complaints by different groups such as the Alevis and the Kurdish insurgents were considered to have been “inherited from the authoritarian past” and they were something that needed to be dealt with based on common “national interests.”

Consecutive election victories with absolute majorities have now kept the AKP and its leader Erdogan in power for more than 13 years. The party governs alone and is almost unchallenged in parliament.

Turkey has been and still is one of a handful of Muslim countries with a functioning parliament and a generally free election system. As in all democratic counties, the parliament has been a strong tool for checking, correcting, or even stopping and changing governments.

Having an absolute majority in parliament made this new, ambitious and hardworking government very effective and initially successful.

The AKP majority in parliament had only one main goal: backing the AKP government and Erdogan, who, for his part, increasingly felt emboldened to pass any law, make any appointment, adopt any policy, domestic or foreign, and govern as he wished.

Still, it generally worked nicely. For a few years…

‘Fleeing Forward’

This “air of pluralism and tolerance” probably started to disappear after the constitutional referendum in 2010 and the general elections in 2011.

The results of the national vote in 2010 on changing the constitution showed 58 percent support for the AKP and Erdogan, but also strong opposition with 42 percent voting against. Most of those who rejected the proposed changes were based in Western, more developed provinces of Turkey. The result mainly supported legal changes aimed at bringing the country closer to EU standards, but that had never been Erdogan’s “big dream.”

In the following 2011 general election the ruling AKP again won a big majority of 50 percent, enough to govern alone, but clearly showing that support for the party was continuing to decline gradually.

Erdogan understood that he could not win a new referendum to change the constitution and take Turkey from a parliamentary to an “executive presidential” system that would have him standing atop a regime that was effectively a “one-man show.”

By this time, the AKP government and Erdogan himself were heavily assisted by the strong, but hidden, hand of an unofficial ally: a large religious, half clandestine group that had formed around Fethullah Gulen, an Islamic cleric whose many supporters had in the previous decades successfully but very quietly infiltrated the media, the military, and other branches of government, including the justice and education departments.

Gulen himself had to seek political asylum in the United States when governments before the AKP came to power suspected his group of orchestrating an overhaul of government agencies.

Erdogan, being Erdogan, probably felt that he had to consolidate his grip on the entire system — not just on the parliament and the economy.

The other hurdles that could control and limit his dreams of unchecked power were the justice system (judges and prosecutors), the military and the police, and, finally, the media, which was traditionally free and quite varied in Turkey.

The first serious cracks in this “tyranny of the majority” appeared in 2013 after the emergence of protest movements that were not as weak and toothless as before. These protests were followed by serious allegations of corruption against AKP leaders and even members of Erdogan’s family.

Seeing that his regime was in steady decline and under attack, Erdogan rather typically decided to “flee forward.”

The public tone against opposition parties and their leaders became rude and personal. They also responded in a similar “Erdoganian” manner.

The language used in discussion about foreign leaders, countries and parliaments, as well as their history and culture, became increasingly embarrassing.

Political discourse became a competition of insult and abuse, a contest of accusations and unfounded claims.

Ruled By Fear

Secular, pro-republican and critical military commanders were sent into retirement. The military, by then the major instrument in defending secularism and the country’s territorial integrity, “lost its teeth” as a retired chief of staff noted.

The government and a changed pro-Erdogan justice and security system went after anybody in the military, the police, the judiciary, political parties, the education system, and the media who was not clearly loyal to them. Military commanders, judges, university professors, and top journalists were arrested in overnight operations and brought to court based on unclear and unfounded allegations or documents that were later openly declared “fake.” Newspapers and TV channels received “midnight phone calls” on how to formulate their editorials and whom to invite on talk shows.

Government agencies, courts, the military, and the media began to be ruled by fear and the need to feign loyalty.

Erdogan and his whole party and government apparatus then turned against their allies and insiders, including the Gulen group, co-Islamists whom they accused of trying to create a “parallel state” in Turkey with their prosecutors, judges, bureaucrats, and journalists.

Media organizations were pressured and even directly instructed to fire dissident executives as well as leading journalists and columnists. The same happened with secular judges who lost their jobs or were even tried themselves by their former colleagues loyal to the AKP.

When there was nobody else left, they turned against their “brothers” from the early days of the AKP.

Most of them, including former President Abdullah Gul as well as former Prime Minister and Foreign Minister Ahmet Davutoglu (who have both been AKP leaders), have already abandoned Erdogan. Asked if the AKP is still pursuing any political ideals, Gul’s former chief adviser Ahmet Sever recently said “What ideals? What cause? Nothing is left.”

For Erdogan and the AKP, it is now all about keeping power. Their power base is eroding and it can no longer win the support of two-thirds of the population in order to legalize a one-man regime. So, at least they can clip the wings of all institutions that could check and limit their power. Doing this helps them to stay at the helm.

That is the mixed story of the rise of the AKP and its slow decline.