Turkey's long-standing leader Recep Tayyip Erdogan has won a new five-year term after securing outright victory in the first round of a presidential poll.
Mr Erdogan got nearly 53% with almost all votes counted. His closest rival Muharrem Ince was on 31%.
He will now assume sweeping new powers, won in a controversial referendum last year. The post of PM will be abolished.
Mr Ince accepted the result on the basis of poll figures - but said that everything about the vote was unfair.
Final results will be announced on Friday.
The polls were the most fiercely fought in many years.
Mr Erdogan has presided over a strong economy and built up a solid support base by investing in healthcare, education and infrastructure.
But the 64-year-old has also polarised opinion, cracking down on opponents and putting some 160,000 people in jail.
Mr Erdogan gave a triumphant victory speech from the balcony of his party's headquarters in the capital Ankara at 03:00 (00:00 GMT), declaring: "The winner of this election is each and every individual among my 81 million citizens."
Congratulations have come in from Islamic leaders including Iranian President Hassan Rouhani. Russian President Vladimir Putin talked of Mr Erdogan's "great political authority and mass support".
Mr Ince, from the Republican People's Party (CHP), said the election was unfair from its declaration to the announcement of the results.
Turkey was entering a dangerous period of one-man rule, he added.
But he said that there was no significant difference between official results and his party's figures, and therefore he would accept the outcome.
There were another four candidates on the presidential ballot, all of whom fell below 10% of the vote.