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.
Election authority chief Sadi Guven said the president had “received the absolute majority of all valid votes”.
State media reports put Mr Erdogan on 53% with 99% of votes counted, and his closest rival Muharrem Ince on 31%.
The opposition is yet to officially concede but said it would continue its democratic fight “whatever the result”.
It had earlier cast doubt on results being broadcast by state media. Final results will be announced on Friday.
The polls were the most fiercely fought in many years, and Mr Erdogan is set to assume sweeping powers under a new executive presidency.
He 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.
- Turkey’s elections in 100 and 500 words
- Erdogan: Turkey’s pugnacious president
- Turks abroad play decisive role in Erdogan vote
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.”
There are reports that Republican People’s Party (CHP) presidential candidate Mr Ince has admitted defeat in a message to a journalist, though this has not been confirmed.
Earlier on Sunday he accused state-run news agency Anadolu of “manipulation” over its reporting of vote-share figures.
Mr Ince tweeted that he would make a statement at 12:00 (09:00 GMT) on Monday.There were another four candidates on the presidential ballot, none of whom appears to have won more than 8.4% of the vote.
What does the result mean?
President Erdogan will assume major new powers under Turkey’s new constitution. The changes were endorsed in a tight referendum last year by 51% of voters, and are due to come into force after the election.
- Directly appointing top public officials, including ministers and vice-presidents
- The power to intervene in the country’s legal system
- The power to impose a state of emergency
The job of prime minister will also be scrapped.
Some critics argue the enhanced role will place too much power in one person’s hands, and that Turkey’s new system lacks the checks and balances of other executive presidencies like France or the US.
Mr Erdogan maintains his increased authority will empower him to address Turkey’s economic woes and defeat Kurdish rebels in the country’s south-east.
In his victory speech, he said Turkey would act more firmly against terrorist groups, and would continue to “liberate Syrian lands” so refugees could return to their homes there.
Mr Erdogan was prime minister for 11 years before becoming president in 2014. Under the new constitution, he could stand for a third term when his second finishes in 2023, meaning he could potentially hold power until 2028.
Who won seats in Turkey’s parliament?
Mr Erdogan said the governing alliance led by his AK Party (AKP) had secured a majority, in a separate vote for the 600-member chamber.
- Reality Check: The numbers behind Turkey’s crackdown
- Losing their religion: The young Turks rejecting Islam
- Turkey country profile
State news agency Anadolu said the AKP itself had 42% of the votes for parliament with 99% counted, giving it a projected 293 seats. Its partner, the MHP, had 11% and 50 seats.
The opposition CHP won only 23% (146 seats) despite Mr Ince’s popularity in the presidential vote, while its nationalist ally the Iyi (Good) party won 10% (44 seats).
In a development that will please Kurdish voters, the pro-Kurdish HDP has exceeded the 10% threshold needed to enter parliament. With 67 seats, it will form the chamber’s second-largest opposition faction.
Fireworks lit up the sky in the Kurdish-majority city of Diyarbakir as results came in.
The party’s success comes despite the fact its presidential candidate Selahattin Demirtas is in a high-security prison on terror charges, which he firmly denies.
- WATCH: Why the Kurdish vote was key
- The full story: Life under President Erdogan
Was the voting free and fair?
Security was tight at polling stations. Ahead of the vote, concerns had been raised about potential voter intimidation and electoral fraud.
Turkey’s election commission has already said it will investigate alleged irregularities in Urfa province, on the southern border with Syria.
Voter turnout was high at almost 87%, the state broadcaster reported.
Rights activists have said the press is not free to report on all sides in Turkey. It has become the world’s biggest jailer of journalists under Mr Erdogan’s rule, according to monitoring groups.
Mr Erdogan has already cautioned his rivals against claiming foul play, saying: “I hope nobody will try to cast a shadow on the results and harm democracy in order to hide their own failure.”
What were the election issues?
The biggest was the economy. The Turkish lira has tanked and inflation stands at about 11%, though the economy has grown substantially in recent years.
The currency has suffered as Mr Erdogan has pressed the central bank not to raise interest rates and suggested before the poll that he might restrict its independence.
Terrorism was another key issue, as Turkey faces attacks from Kurdish militants and the jihadists of the Islamic State group.
- Turkey’s brain drain: Crackdown pushes intellectuals out
Mr Erdogan’s rivals accused him of damaging civil liberties in Turkey and spearheading a slide into authoritarian rule.
Turkey has been under a state of emergency since a failed coup in July 2016, with 107,000 public servants and soldiers dismissed from their jobs. More than 50,000 people have been imprisoned pending trial since the uprising.
CHP candidate Mr Ince’s fiery campaigning helped to revitalise Turkey’s downtrodden opposition – but ultimately he lacked the numbers to end Mr Erdogan’s dominance.
BBC Turkey correspondent Mark Lowen tweeted: “Yet again one half of #Turkey feels invincible, the other distraught.”