Turkish voters delivered a dramatic blow to President Recep Tayyip Erdogan and his ruling Justice Development Party on Sunday, with results showing it losing its majority in parliament.

And, in a historic first, a party dominated by ethnic Kurds surged into the Grand National Assembly in Ankara, marking a new moment in the evolution of Turkey’s democracy as well as a direct challenge to Erdogan’s own ambitions to consolidate power as president.

“This is a nuclear explosion in Turkish politics,” said Bulent Aliriza, an expert in Turkey at the Center for Strategic and International Studies in Washington.

As uncertainty shrouded the make-up of a future government, Turkey’s main stock index fell by 8 percent and its currency, the lira, dropped to a record low against the dollar.

Erdogan had been seeking a supermajority to force through constitutional change, but according to the state Anadolu news agency, his center-right party, known by the Turkish abbreviation AKP, secured less than 41 percent of the vote with 99 percent of ballots counted. Although it is still the biggest party in the country, the AKP suffered its worst result since 2002. It was projected to lose its majority in parliament, an astonishing turn of events for a party that has dominated Turkish politics for almost a decade and a half.

The AKP was expected to fall far short of the 330 seats needed to force a national referendum on Erdogan’s plan to scrap Turkey’s parliamentary structure for a presidential system, with him at the top.

“The nation’s decision is the best decision. Do not worry,” Prime Minister Ahmet Davutoglu said in a cagey post-election speech. He was the face of the AKP’s election campaign, if not necessarily the figure pulling its strings.

The deciding factor in this election was the emergence of the Peoples’ Democratic Party, or HDP, which came in fourth with 12 percent of the vote. For a political party to enter Turkey’s parliament, it has to pass a threshold of 10 percent of the total vote. The HDP did so and will command an estimated 78 seats in the 550-seat legislature, mostly won at the expense of the AKP.

It was a remarkable achievement for a party that was formed less than three years ago and has direct ties to the violent three-decade Kurdish separatist insurgency in Turkey’s southeast. The war between the militant Kurd­istan Workers’ Party, or PKK, and the Turkish state has claimed 40,000 lives since it first flared in the early 1980s.

“From now on, HDP is Turkey’s party. HDP is Turkey, Turkey is HDP,” the party’s leader, Selahattin Demirtas, said Sunday evening at a news conference in Istanbul.

The party framed itself as a leftist movement for all Turks and boasted a diverse slate of parliamentary candidates, including representatives of virtually all of Turkey’s major ethnic groups, a large number of women and the nation’s first openly gay candidate.

A supporter of the pro-Kurdish Peoples' Democratic Party holds a flag in Diyarbakir, Turkey, after elections on June 7. (Bulent Kilic/AFP/Getty Images)

The HDP’s progressive agenda appealed to disgruntled urban voters who disliked the AKP and struggled to identify with the other main opposition parties — the secularist Republican People’s Party, or CHP, a staunchly republican party that walks in the shadow of Turkey’s founding father, Mustapha Kemal Ataturk, and the Nationalist Action Party, or MHP, which is “a stone’s throw away from fascist,” said Aaron Stein, an associate fellow at London’s RUSI think tank.

“The HDP represents the diversity of the minorities in Turkey and a real pluralist democracy,” said Laura Batalla, secretary general of Friends of Turkey, a unit attached to the European Parliament.

The HDP’s success, given the party’s origins, speaks to the maturing of Turkish democracy. Among the HDP’s parliamentarians are relatives of jailed or slain leaders of the PKK, an organization still considered a terrorist group by Washington and An­kara. Demirtas, the HDP’s charismatic icon, is believed to have a brother among the guerrillas.

For decades, Kurdish identity was suppressed by the Turkish state. Ironically, it was under Erdogan and the AKP that Kurds began to experience more cultural rights, including the freedom to speak and write in their own language.

It’s now “impossible to sideline Kurdish politics,” says Akin Unver, a professor of international relations at Kadir Has University in Istanbul. “Despite the civil war of the 1990s, Kurds have evolved politically and established a lasting legacy” on the Turkish national stage.

It is unclear what may follow. The three main opposition parties have so far ruled out entering into a coalition with the AKP, which may choose to attempt a minority government or enter a scenario where early elections are called.

Erdogan issued a careful statement on Monday, saying the “current situation” would be “evaluated healthily and realistically by all parties that have taken part in the race.”

Analysts believe Erdogan’s desire to assume further powers and eliminate checks and balances through an executive presidency badly backfired.

“Erdogan may have made the mistake of his political life by going for the presidency,” said Aliriza, instead of remaining as prime minister, a post he held from 2003 until last year. “If he had not decided to go for the presidency, we would now be discussing his record fourth electoral victory as prime minister.”

Under Erdogan’s rule, Turkey has transformed dramatically.

Reforms have lifted a new middle class and empowered a whole stratum of society outside the secular elites entrenched in the country’s western coastal cities.

In the Istanbul neighborhood of Kasimpasa, a traditionally lower-middle-class area and AKP stronghold where Erdogan was born, voters praised his years of rule.

“Thanks to Erdogan, so much has changed. There is prosperity and stability,” said Hafiza Aktas, who cast her ballot at a polling station in the primary school where Erdogan was a student.

Aktas said the AKP’s sweeping reforms of Turkey’s health system have been life-saving for her family. And, pointing to her red-and-black headscarf, she said the party has lifted decades of secularist suppression of the country’s devout Muslims.

“I can go everywhere now. I have real freedom,” said Aktas, referring to earlier bans on the wearing of headscarves at public institutions.

But the AKP has been hobbled by corruption scandals and anger about its increasing control over state institutions, as well as fatigue with Erdogan’s increasingly authoritarian style. The party lost considerable votes in central and eastern Anatolia, usually a reliable base of support. Erdogan’s party no longer has a lock on the vision for Turkey’s future.

On Sunday morning, Demirtas cast his ballot at a school in Sultanbeyli, a working-class neighborhood in Istanbul with a large Kurdish population.

His arrival at the venue was like a rock star’s. The car carrying Demirtas was mobbed by supporters who chanted, clapped and cried in joy. Youths, some decked out in shirts and flags hailing Kurdistan, clambered onto fences and walls to catch a glimpse of their hero.

“Our leader is the greatest leader,” they chanted.

On the sidelines was Melek Karmaz, a Turkish woman who is married to a Kurd and held their child in her arms.

“There’s no difference between us. We all shed the same tears,” she said, referring to the suffering experienced during the years of the civil war.

“I am so proud to cast this vote as a Turk.”

Vildan Ay contributed to this report from Istanbul.

Read more

Is Turkey reaching a turning point?

Turkey’s Kurds find themselves on threshold of unprecedented power

For Turkey and U.S., at odds over Syria, a 60-year alliance shows signs of crumbling