Workers hang portraits of Mustafa Kemal Ataturk, President Abdullah Gul, and Prime Minister Tayyip Erdogan before a groundbreaking ceremony for the third Bosphorus bridge linking the European and Asian sides of Istanbul May 29, 2013. (Murad Sezer / Courtesy Reuters)

In some circles, it is almost a matter of faith that the ongoing protests in Turkey will not have any serious political consequences for Prime Minister Recep Tayyip Erdogan. As CFR Fellow Steven Cook wrote on ForeignAffairs.com this week, “Even today, as the tear gas continues to fly, there is no question that Erdogan would win an election.” The assumption is that the prime minster can still rely on at least the passive support of the 50 percent of the population that cast their votes for his Justice and Development Party (AKP) in the last election, held in 2011. Even if they are not entirely happy with his behavior, the thinking goes, they are not ready to withdraw their backing -- good news for Erdogan, who would like to crown himself president next year. Yet it would be a mistake to assume that Erdogan’s supporters are with him for the long haul. In the end, the Taksim Square protests -- and the prime minister’s response to them -- have likely marked the end of an era.

As many have pointed out, the protesters in Istanbul and other Turkish cities mainly hail from the secular and liberal urban middle class. Yet they are far from alone in their weariness of Erdogan’s growing authoritarianism. Religious conservatives, the AKP’s main voter base, are uneasy with it, too. Notably, the most powerful religious community in Turkey, the fraternity of the Muslim preacher Fethullah Gulen, is now openly opposed to the prime minister. On April 17, 2013, the group even released a statement expressing deep concern about new restrictions on the freedom of expression in Turkey. It is hard to overstate how dramatic this break is: Gulen’s group was Erdogan’s main ally in his power struggle against the now defunct Kemalist state establishment.

Gulen’s decision to speak out did not necessarily reflect an ideological commitment to a free press -- more likely, he wants to grab power from a weakened Erdogan while he can -- but the criticisms nevertheless color the way the prime minister’s core constituency sees him. And even if that constituency is not about to abandon the AKP, which still represents its interests, it might abandon Erdogan. As the protests die down, religious conservatives will probably throw their weight behind Turkish President Abdullah Gul -- who was one of the co-founders of the AKP but who has also become Erdogan’s rival in recent years -- if he decides to stand for reelection in 2014. And that is an outcome that Erdogan has been trying to forestall.

As if the loss of some of the religious conservatives were not bad enough, Erdogan also stands to lose ground among more secular conservatives. Since his reelection in 2011, he has been pursuing an explicitly ideological Islamic agenda. He has promised to “raise a pious youth,” made an attempt to ban abortion, and overseen a drift in the education system toward religious conservatism. Recently, his government imposed new restrictions on the consumption of alcohol. Faced with an outpouring of criticism, Erdogan demonstrated his contempt for the secularists by telling them to “go and drink at home,” suggesting that there is no place in the public space for those who have preferences other than those prescribed by the government. With every such statement, Erdogan is seen as less a leader of the center.

The prime minister’s increasingly pronounced ideological bent is not something that appeals to the more casually conservative masses in Anatolia, who have traditionally rallied behind the center right for its moderate social conservatism and its emphasis on economic development. They have supported Erdogan primarily because of his apparent affiliation with that tradition, not because they crave more religion in politics. Accordingly, leading conservative commentators in pro-AKP media outlets have not hesitated to criticize Erdogan for his apparent inability to show empathy. Like their more religious counterparts, they would rather not abandon the AKP but do apparently prefer Gul, who has a reputation for moderation.

Erdogan’s own party members sense the changing tide. Indeed, even before the protests, there was widespread uneasiness within the AKP ranks. Most AKP parliamentarians had little enthusiasm for Erdogan’s plan to change the constitution and introduce an executive presidency. His scheme would have concentrated all power into the hands of a supreme leader, a position that Erdogan covets, basically neutering all other government officials. The prime minister’s handling of the protests has now made party members even more nervous. As Erdogan lashed out -- calling those who took to the streets “marauders,” extremists, and foreign agents, and threatening retaliation -- Deputy Prime Minister Bulent Arinc issued an apology to the demonstrators and said that the authorities should have tried to meet their demands. Another AKP representative, Kadir Topbas, the mayor of Istanbul, admitted that the municipality had committed a grave mistake. And Gul made a principled defense of the right to protest from the outset, a reminder that voting is not the only democratic right.

It is true that Erdogan has traditionally thrived on polarization; earlier attacks on secularists have served to keep the religious conservatives mobilized behind the AKP. But this last week might be a bridge too far. As the reactions of other leading representatives of the AKP demonstrate, though, all of Erdogan’s various constituencies no longer want confrontation. They see it as a threat to the stability of Turkey, and ultimately to their hold on power. So although it is unlikely that the protests will force Erdogan to resign, it is also unlikely that he will survive the uproar with enough political capital to realize his presidential ambitions next year.

Those who assert that the protests will not bring the liberals to power are right -- they are far too disorganized for that. But that does not mean that the demonstrations have not seriously hurt Erdogan. His handling of the crisis has significantly strengthened the position of his rival. Several polls have already put Gul ahead of Erdogan in a hypothetical contest for the presidency. If anything, then, it is Gul and possibly a refreshed AKP that will emerge from the scuffle in Taksim Square as the ultimate winners.