President Recep Tayyip Erdogan hails new era for Turkey
Outgoing PM Recep Tayyip Erdogan has hailed his victory in Turkey's first direct presidential election as a new era for the country.
He told thousands of supporters from the balcony of his AK Party's HQ in Ankara his victory was for all Turks, not just those who had voted for him.
Mr Erdogan secured about 52% of the vote, to avoid any run-off.
Mr Erdogan wants to secure more power for the presidency but his opponents fear increasingly authoritarian rule.
Until now the presidency has been largely ceremonial.
Mr Erdogan has been prime minister since 2003 and was barred from standing for another term.
He will be inaugurated on 28 August.
The AK Party must now appoint a party leader and prime minister-designate. Analysts say it is likely to be one Mr Erdogan can control.'Common values'
Mr Erdogan told supporters: "I will not be the president of only those who voted for me, I will be the president of 77 million.
"Today the national will won once again, today democracy won once again. 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."
Striking a note of conciliation largely absent from the campaigning with his two rivals, he said: "I want to build a new future, with an understanding of a societal reconciliation, by regarding our differences as richness, and by pointing out not our differences but our common values."
The veteran leader is revered by supporters for boosting the economy and giving a voice to conservatives.
But his critics lament his authoritarian approach and Islamist leanings in a secular state, says the BBC's Mark Lowen in Ankara.
Devlet Bahceli, the head of the Nationalist Action Party, which backed rival Ekmeleddin Ihsanoglu, told Associated Press that Mr Erdogan had won "through chicanery, cheating, deception and trickery".
Mr Ihsanoglu secured about 38% and the third candidate, Kurdish politician Selahattin Demirtas, about 10%.
Official results will be confirmed on Monday.
Our correspondent says turnout appears to be much lower than expected - some voters may have been dissuaded by the summer heat and holidays.
Turkey - wedged between the turmoil of Iraq, Syria and Ukraine - is an important ally for the West, our correspondent adds, and the head of state will hold a key geopolitical position.