The results of Turkey’s June 7 legislative elections represent a significant setback for President Recep Tayyip Erdogan’s political aspirations to change the constitutional framework and become an autocratic leader with unmatchable powers.

Not only has his AK Party lost the majority in the Turkish Parliament, but for the first time a Kurdish party, The People’s Democratic Party (HDP), which succeeded in attracting the Turkish left, religiously conservative Kurds who had voted for the AKP in previous elections, and disaffected liberals, passed the difficult threshold of 10 percent of the vote and entered the Parliament in force. Most Turkish analysts and columnists have portrayed HDP’s leader Selahattin Demirtas as the star of Sunday’s parliamentary elections.

Paradoxically, Erdogan is himself is responsible for his own demise and for the Kurdish victory.

One of Erdogan’s most important legacies is an ongoing peace process with the outlawed Kurdistan Workers’ Party’s (PKK). The Kurdish Opening of the AKP government has put a temporary halt to a thirty year insurgency that has cost over 40,000 lives.

After years of clandestine negotiations with PKK’s imprisoned leader Abdullah Ocalan by Turkey’s intelligence chief Hakan Fidan, one month before the August 10, 2014 presidential elections, the Turkish Parliament approved legislation creating the legal framework for Turkish politicians to engage in the peace talks.

The peace process caused fierce opposition by Turkey’s nationalist camp and toward the end of the presidential campaign, Erdogan‘s ethnic and sectarian appeals to the Turkish nationalist camp helped him gain the Presidential race.

Thus, President Erdogan faced a choice between expanding his Kurdish Opening, “which will move Turkey closer to becoming a bi-national state [or] continuing to assuage right-wing Turkish nationalism.” His AK Party will be hard put to manage rising expectations among Turkey’s Kurds while retaining Turkish nationalist support for the 2015 elections.

It was clear during this negotiation process that Prime Minister Erdogan’s liberal policy vis-à-vis the Kurds was meant mainly to bring him their votes in his campaign for the presidency and stabilize the country during a period of regional turmoil.

With the approach of the June legislative elections, Erdogan faced a serious dilemma, as he acutely needed the Kurdish vote for his Presidential project but feared the backlash of the Turkish nationalists and the military.

Erdogan showed no signs that it plans to meet any of the Kurds main demands, including constitutional changes to give Kurds ethnic-based rights and some self-rule. He focused on avoiding concessions while extracting promises that the PKK will disarm and disband.

On February 15 he said he was “expecting” Ocalan to make a statement that the PKK was going to disarm, hoping this would give his party a boost before the national elections.

However, Ocalan stopped short of calling for the full disarmament of the PKK, a move Turkey’s government had expected. In an address delivered 21 March on behalf of Ocalan by HDP leaders in the majority Kurdish city of Diyarbakir, where thousands gathered for the celebration of Nevruz, the PKK leader emphasized that a “democratic solution” was the only way to settle Turkey’s Kurdish problem.

HDP’s leader Demirtas for his part realized that he needed to contain the damage from the joint statement by Kurds and the Turkish government and on March 17, he said his party would never help Erdogan realize his ambitions for presidential rule, even as he restated Kurdish commitment to making peace with Turkey.

The direct result of Erdogan’s disappointment has been the government’s decision to isolate Ocalan in the İmrali prison beginning April 5, when HDP’s delegation last visited him.

Turkish journalist Cengiz Candar predicted two days before the elections that in any scenario of the elections results “for many citizens of Turkey, notwithstanding the uncertainties the elections may lead to, the most important outcome would be to see whether the beginning of the end of the Erdogan era will commence.”

Some Turkish newspapers like Sozcu headlined the “downfall” of President Erdogan, and Today’s Zaman dubbed it a rejection of “authoritarianism, the palace, and corruption.” London’s Al-Quds al Arabi expects the ramifications of the vote to “define the future of the whole region for years to come.”

President Erdogan for his part could be in a state of shock. At the writing of these lines, Monday evening, he didn’t appear in public and Erdogan’s office issued a brief statement declaring that the nation’s will is above everything else. He acknowledged that no party had won an overall majority and said this was a “real and healthy” reflection of the election race. He stressed the great importance of “responsible behavior and necessary sensitivity” of all political forces “to preserve the atmosphere of stability and confidence in [the] country and [the] democratic achievements.”

Erdogan’s conciliatory tone contrasted sharply with the highly polarizing language he used during the campaign.

Turkey enters now a period of political uncertainty and the issue of the difficult process to build an unnatural coalition or to return to new elections will preoccupy the Turkish political class and the public.

HDP’s huge electoral success gives it now a leverage to press the government for the liberation or at least easier detention conditions for PKK leader Ocalan. At the same time it will clearly put the Kurds in a position of force in the negotiations for their future in the Turkish state.

On the internal and regional strategic level, the Kurds’ new political status will change the rules of the game in Turkey, but probably also in Syria, Iraq and even Iran.