For more than a decade, Recep Tayyip Erdogan appeared unstoppable. He steered his party to ever-larger victories at the ballot box, consolidated his own grip on power and emerged as a leader with a keen instinct for popularity and polarization.

That era ended on Sunday. In an election in which voters were asked whether they wanted even more of Mr. Erdogan, Turkey's President, and his ruling Justice and Development Party (AKP), the answer was an emphatic no.

In a stinging setback to Mr. Erdogan, his party lost its majority in parliament for the first time since 2002. The results open the way for the AKP to form a coalition or minority government. If neither of those scenarios materializes, fresh elections could take place later this year.

Story continues below advertisement

Sunday's electoral earthquake in Turkey means that its politics are now more volatile and uncertain than at any point in the last 13 years – but in some ways, they are also more hopeful. As his hold on power has solidified, Mr. Erdogan has grown increasingly authoritarian. In this election, his aim was to obtain a parliamentary majority large enough to amend Turkey's constitution, creating a presidential system of government with him at the apex.

Fulfilling that ambition is impossible for now. Mr. Erdogan was thwarted by the electoral success of Turkey's new political star, Selahattin Demirtas. Mr. Demirtas is the telegenic leader of the pro-Kurdish, left-wing People's Democratic Party (HDP). The party made an appeal not just to Turkish Kurds but also to disaffected liberals, women, gay voters and environmentalists. The gamble paid off: HDP received an estimated 13.1 per cent of the vote in its maiden electoral outing, sailing past the 10 per cent threshold for entering parliament on a party slate.

The new parliament will also be notable for the presence of Turkey's minorities. For the first time, a candidate from the Roma community was elected. Three seats will belong to members of the Armenian community, after 50 years without such representation.

"Parliamentarianism has won," said Ozgur Unluhisarcikli, who heads the Ankara office of the German Marshall Fund of the United States. "Each and every member of parliament will matter, which has not been the case in the last decade."

Story continues below advertisement

According to preliminary results, Mr. Erdogan's party won 40.8 per cent of the votes and is set to receive 258 seats in parliament out of a total of 550, down from 327 at present. In second place is the secularist, centre-left Republican People's Party (CHP) with 132 seats. And tied for third place are the pro-Kurdish HDP and the right-wing Nationalist Movement Party (MHP), each with 80 seats.

The new uncertainty in Turkey's politics raised fears that the country – a NATO member and pivotal power in the region – could return to an era of unstable governments. On Monday, the Turkish lira slid to an all-time low against the U.S. dollar and the benchmark stock index fell 6 per cent as rattled investors sold shares.

Much still depends on Mr. Erdogan. He hasn't made any public appearances since Sunday night, an abrupt change for a politician who seemed to be everywhere during the campaign. (One Turkish newspaper waggishly posted a ticking clock on its website showing how long Mr. Erdogan had been absent from the airwaves: by Monday afternoon, it had passed 24 hours.)

On Monday, he issued a statement, saying that Turkey's political parties would evaluate the results "healthily and realistically." He urged all of the parties to "show the necessary sensibility and responsibility to preserve stability … as well as democratic gains."

Story continues below advertisement

That's a very different tone from just days ago, when Mr. Erdogan was attacking his rivals with typical verve, hoping to rally voters by referring to opponents as "representatives of sedition," atheists and homosexuals.

Mr. Erdogan's energetic vote-mongering eclipsed that of Ahmet Davutoglu, his party's candidate for prime minister. Turkey's President is supposed to occupy a ceremonial role above the fray, but Mr. Erdogan was a relentless presence during the campaign, which mobilized his admirers but also galvanized his opponents. Meanwhile, a cooling economy and corruption allegations against Mr. Erdogan's government dented support for the AKP, even among Turks who have embraced its brand of Islamist politics.

The next few weeks will be critical. Once the final results are released in mid-June, the AKP, led in parliament by Mr. Davutoglu, may try to form a coalition government. The likely partner: the right-wing MHP, although so far it has rejected a tie-up.

Such a partnership is the most probable outcome, asserted Wolfango Piccoli, a Turkey analyst at Teneo Intelligence in London, since both parties draw voters from the conservative side of the political spectrum. But the coalition would be "inherently unstable, with a limited shelf life," Mr. Piccoli wrote on Monday. It would also make it difficult to move forward with negotiations to resolve Turkey's long-running conflict with Kurdish militants.

Story continues below advertisement

Meanwhile, the presence of the People's Democratic Party in parliament for the first time is opening a new chapter in Turkey's Kurdish politics. The party has said it is a political movement that is not connected to the Kurdistan Workers' Party, or PKK, a militant group that both the U.S. and Turkey label a terrorist organization.

The HDP knows that it benefited from the backing of voters who were seeking to block Mr. Erdogan's grand visions of a presidential system. But it intends to make a bid to keep them. "This is a victory of democracy over tyranny, freedom over oppression," said Sirri Sureyya Onder, one of its members of parliament, on Sunday night. The party understands it won some of its seats with "borrowed votes," he said, promising to honour that support.

"Our language is the language of peace," said Hasan Atesci, 45, an HDP official in the central Anatolian city of Konya in an interview last week. "And we also defend the rights of the Kurdish people who have never received full attention from Turkey."