Turkish prime minister Recep Tayyip Erdogan won the country’s first direct presidential election on Sunday, and issued a message of unity, saying he would be a president for everyone.

“I will not be the president of only those who voted for me, I will be the president of 77 million,” Erdogan said in a victory speech delivered from the balcony of his Justice and Development Party headquarters in Ankara.

“Today the national will won once again, today democracy won once again,” he told thousands of flag-waving, cheering supporters. “Those who didn’t vote for me won as much as those who did, those who don’t like me won as much as those who do.”

With 99% of ballot boxes counted, Erdogan had 51.95% of the vote, according to figures from the state-run Anadolu news agency, which had reporters at ballot counting stations across the country. Opposition candidate Ekmeleddin Ihsanoglu, a former diplomat and academic had 38.34% and the third candidate, Selahattin Demirtas, had 9.71%.

Supreme Election Council head Sadi Guven said Erdogan had won but that no official results would be released until Monday.

Erdogan’s win was expected: recent opinion polls had him far ahead of Ihsanoglu, 70, and Demirtas,41, co-chairs of the pro-Kurdish Democratic People’s party (HDP).

Ihsanoglu congratulated Erdogan and wished him a successful term as president.

The pro-Kurdish HDP emerged as the surprise winner: in several provinces outside the Kurdish region the party managed to substantially increase their votes. In a first reaction to the results, Demirtas told a cheering crowd in Diyarbakir that the HDP would continue to expand their base and celebrated the “victory of democracy and equality” despite “an unfair and unequal election campaign”.

“The messages we wanted to convey has reached all of Turkey, and our presidential election campaign has reached its goal. This is an important result and a victory,” Demirtas said.

The Turkish president was previously chosen by parliament, but a 2010 referendum gave Turks the power to choose the head of state by direct vote. Until now the post has largely been a symbolic one, but Erdogan has repeatedly underlined his wish to use “the full extent of his constitutional powers” to be an “active president”. Critics fear that he will turn an already polarised Turkey into an increasingly authoritarian state.

More than 53 million Turkish voters were eligible to cast their ballots on Sunday. But at several Istanbul polling stations, there was no rush to vote. At midday, one election official in the conservative district of Tophane was disappointed by the low turnout: “There are about 1,000 people who should vote here today, but so far not even 200 have voted. For the local elections in March, this place was heaving. People don’t seem to care as much about presidential elections.”

Dilek Cilingir, 43, a computer engineer from Istanbul, said many people were disillusioned by Turkish politics: “I think a lot of people don’t vote today because they simply gave up. Everybody thinks that Erdogan will win, so they don’t vote at all.”

Cilingir and Doruk Aksoy, 39, had volunteered for the civil rights platform Öy ve Ötesi (Ballot and Beyond) to monitor the elections. Aksoy argued that holding an election in the height of summer may have contributed to the low numbers of voters.

“I changed my holiday plans to be able to be here today,” Cilingir said. “I wanted to take responsibility and do something, not just complain about the state of the country.”

In a teahouse around the corner, men sitting around the tables said they were all firmly standing behind Erdogan: “I voted for the prime minister because he is the only one with a vision, and projects he stands for. He completely turned Turkey around. There is a world of difference between the Turkey today and the Turkey 20 years ago”, Sülayman Güney, 51, a diving instructor, said.

Erdogan, 60, has been in power since 2003. Barred by party rules from seeking a fourth term as prime minister, he has faced multiple challenges to his 11-year rule, amid growing opposition to his authoritarian style. His ruling Justice and Development party (AKP) triumphed in local elections in March, despite allegations of widespread corruption inside the government and a wave of summer protests sweeping the country.

A clear victory on Sunday would solidify Erdogan’s hold on Turkey and put an end to what many see as his most difficult year in power.

Many fear that critics will have an even harder time voicing their opposition to what Erdogan calls “the new Turkey” under him as president.

Berk Ünlüustaoglu, a 28-year-old lawyer who cast his vote on Sunday, said he was very worried about Turkey: “We are increasingly moving towards a state of one party, and one order. I fear that what we will lose is democracy.”