Recep Tayyip Erdogan has won the presidential run-off election, with leaders from around the world congratulating him.
With 99% of the votes counted, Mr Erdogan, who served as prime minister from 2003 to 2014, won with a share of 52.1%.
It means he has secured a record-breaking third term as president and will serve for five more years.
Polls closed at 5pm local time (3pm BST) and while votes were counted fast, for hours it remained too close to call. At one point, less than a percentage point separated the incumbent from his rival, Kemal Kilicdaroglu.
Shortly after 8pm local time (6pm BST) Mr Erdogan stepped out of his home and thanked people for “giving us the responsibility to rule for the next five years”.
He has been congratulated by a host of world leaders. Among them, Vladimir Putin, who wrote a lengthy message to Mr Erdogan, which concluded: “From the bottom of my heart I wish you new successes in such a responsible activity as the head of state, as well as good health and well-being.”
British Prime Minister Rishi Sunak said: “I look forward to continuing the strong collaboration between our countries, from growing trade to tackling security threats as Nato allies,” in a tweet.
French President Emmanuel Macron also sent well-wishes, as well as reiterating the “immense challenges” both countries face.
“The return of peace to Europe, the future of our Euro-Atlantic Alliance, the Mediterranean Sea,” he tweeted.
Opponent refuses to admit defeat
Kemal Kilicdaroglu took the stage earlier this evening, and in a rousing speech, he refused to admit defeat.
“I wasn’t able to defend your rights,” Kilicdaroglu began by saying. “I did not shirk against an unjust structure, I could not be a silent devil and I was not.
“I could not stand quiet against millions of people becoming second-class citizens in this country.
“I could not let them stand all over your rights. For your children to go to bed hungry. For farmers to not to be able to produce. I could not allow these things.”
He concluded by thanking the 25 million people who voted for him – and says the “battle continues”.