Profile: pro-Kurdish HDP Leader Selahattin Demirtas
In a bruising campaign, Demirtas successfully reached out to non-Kurdish voters. He will now lead 79 MPs in the new parliament after scooping over 13 percent of the vote.
Demirtas had been the target of fierce campaign attacks by Erdogan, who belittled him a "pretty boy" who is merely a front for the outlawed separatist Kurdistan Workers Party (PKK). Erdogan also called Demirtas an "infidel" after he pledged to abolish the government directorate of religious affairs and likened him to a "pop star" because he plays the saz, a Turkish folk lute.
But who is Demirtas and what is his legacy?
The "Kurdish Obama"
Born in the Kurdish-majority southeastern city of Elazig, Demirtas is the second-born in a family of seven children.
He became aware of his Kurdish identity at the age of 15 after he attended a funeral of a prominent politician who is believed to have been murdered by security forces in Diyarbakir, Turkey's main Kurdish-majority city.
At that funeral, eight people were killed when unidentified gunmen opened fire on mourners.
In an interview a year ago, Demirtas recalled the event as being the moment when he learned "what it meant to be a Kurd".
After completing his studies at the prestigious Ankara University, Demirtas worked as a human-rights lawyer in Diyarbakir before going into politics in 2007.
Demirtas is referred to as "Selocan" (My darling Selo) by his supporters. His good looks and rhetorical skills have earned him the nickname the "Kurdish Obama", in reference to the US leader.
Transforming the HDP
Demirtas, 42, came third in the 2014 presidential polls with just under 10 percent of the vote, which emboldened his party, Peoples' Democratic Party (HDP), to run as a party in legislative elections for the first time.
After the presidential polls, Demirtas understood that the political influence that his party is seeking can only be gained by addressing and winning the votes of other political circles that oppose Erdogan.
So, he transformed the HDP into a mainstream liberal-left party, encompassing a large faction of women, leftists, LGBTs, anti-nationalists, and of course, Kurds.
Consequently, despite violent attacks on HDP offices prior to parliamentary elections, Demirtas's party easily cleared the 10-percent barrier. "We, as the oppressed people of Turkey who want justice, peace and freedom, have achieved a tremendous victory today", Demirtas said in a speech after the results were announced.
"It's the victory of workers, the unemployed, the villagers, the farmers. It's the victory of the left," he added.
Demirtas's leadership will be further tested as he struggles to keep the promises he made mainly to the Kurdish community. He stands as the first major opposition figure to Erdogan in the Turkish President's 13-year rule.