Turkey’s long-standing leader Recep Tayyip Erdogan has won Turkey’s presidential poll in the first round, the head of the country’s election authority says.
State media reports that Mr Erdogan has 53% with most votes counted, with his closest rival Muharrem Ince on 31%.
Mr Erdogan earlier said the governing alliance of his AK Party had secured a majority in parliament.
Final results will be announced on Friday.
The main opposition party is yet to officially concede defeat. It earlier said many votes remained uncounted but has since said it will continue to fight for democracy “whatever the result”.
Under Turkey’s new constitution, due to come into force after the election, the president will hold considerable power.
Some critics argue the enhanced role will see too much power accumulated in one person’s hands, and that Turkey lacks the checks and balances of other executive presidencies such as France or the United States.
With 96% of the votes for parliament counted, the president’s AK Party leads with 42% of the votes, the state news agency Anadolu reports. The main opposition CHP is on 23%.
The pro-Kurdish HDP looks set to reach the 10% threshold and enter parliament. This might have made it harder for Mr Erdogan’s party and its ally the MHP to reach a majority, although currently they are on course to do so.
Voter turnout is high, at almost 87%, the state broadcaster says.
“I hope nobody will try to cast a shadow on the results,” Mr Erdogan said.
BBC correspondents say he is en route to the Turkish capital, Ankara, to give a victory speech.
There are reports that CHP presidential candidate Mr Ince has conceded 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. He said he would only comment when the official results had been announced.
Why does this election matter?
These elections were originally scheduled for November 2019 but were brought forward by Mr Erdogan.
The new president will be first to govern under the new constitution, endorsed in a tight referendum last year by 51% of voters.
While the other candidates have rejected the changes, Mr Erdogan would start his second term in a turbo-charged version of the job.
The job of prime minister would be scrapped and the president is set to gain new powers, including the ability to directly appoint senior officials and the power to intervene in the legal system.
Who is standing for president?
Mr Erdogan, whose party is rooted in Islamism, was prime minister for 11 years before becoming president in 2014.
He has moved to consolidate his power after a failed coup against his rule in 2016.
Turkey has been under a state of emergency ever since, with 107,000 public servants and soldiers dismissed from their jobs. More than 50,000 people have been imprisoned pending trial since July 2016.
Should he win, centre-left Mr Ince has promised to push back against what he has characterised as a slide into authoritarian rule under Mr Erdogan.
But the incumbent has accused the former physics teacher of not having the skills to lead.
There were another four candidates on the presidential ballot, none of whom looks to have performed particularly strongly.
If Mr Erdogan is not declared to have won more than 50% in the official results, he and Mr Ince will face off in a second-round vote on 8 July.
Is the vote likely to be fair?
Security was tight at polling stations. Ahead of the vote, concerns were 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.
Mr Ince said he would be spending the night at the electoral commission’s headquarters in Ankara to ensure a fair count.
In a tweet, he asked election observers not to leave the ballot boxes. Mr Ince said the commission’s system was reporting that far fewer boxes had been opened than state news agencies had announced.
Rights activists also say the press is not free to report on all sides.
Under Mr Erdogan’s rule, the country has become the world’s biggest jailer of journalists, according to monitoring groups.
But Mr Erdogan said Turkey was giving a lesson to the rest of the world in how democratic elections should be run.
What have been the main election issues?
The biggest is the economy. The Turkish lira has tanked and inflation stands at around 11%.
Terrorism is another vexed issue, as Turkey faces attacks from Kurdish militants and the jihadists of the Islamic State group.
However, correspondents say the country tends to vote along its big divides: one between Kurds and nationalists, and another between religious and secular people.