A final result rests on a second run-off, on May 28, the first in Turkey's history, despite turnout reaching a record high of 88.8 per cent on Sunday.
With exit polling banned in Turkey, the race remained on a knife edge for most of the evening.
Both candidates were confident of victory, but as votes arrived, Mr Erdogan's edge slimmed. By 11pm, state media predicted he had fallen short of the threshold for outright victory.
On Monday morning, the country's supreme election board said Mr Erdogan had won 49.4 per cent of the vote, with 99 per cent of domestic ballot boxes opened and more than 86 per cent of overseas ballot boxes counted.
It later confirmed that a second-run off would take place on May 28.
While both were certain of a first-round victory, Mr Erdogan and Republican People's Party (CHP) leader Mr Kilicdaroglu have accepted the uncertainty, with the President saying a second round is “welcome” if it is the will of the people.
“We will definitely, definitely win this election in the second round … and bring democracy,” said Mr Kilicdaroglu.
How the next few weeks will unfold is unclear. More than three million people voted from abroad at overseas diplomatic missions and airport customs.
They will now have to vote again, as will the more than 60 million eligible domestic voters — as long as voter apathy does not take hold.
One clear result emerging from Sunday's vote is the power yielded by nationalist presidential candidate Sinan Ogan, who managed to secure more than 5 per cent of the vote.
Mr Ogan said he would not back the opposition unless Mr Kilicdaroglu provides assurances that he would not give concessions to Kurdish parties, who have backed the CHP leader against Mr Erdogan.
“We will consult with our voter base for our decision in the run-off. But we already made clear that the fight against terrorism and sending refugees back are our red lines,” he told Reuters on Monday.
Why did Kilicdaroglu come second?
Analysts have told The National it will be difficult for the opposition to make a strong enough comeback to secure the presidency.
The result has surprised many, including Prof Mesut Yegen, a researcher at the Reform Institute in Istanbul, who said he expected Mr Kilicdaroglu to secure more votes than Mr Erdogan, if not enough for a majority.
“It's rather difficult for Kilicdaroglu to win and Erdogan to lose,” he said, citing a 4.5 per cent margin between the two rivals and the likelihood of most votes for Sinan Ogan going to the incumbent leader on May 28.
Reasons for Mr Kilicdaroglu's failure to clinch a victory are varied, he said, including the AKP's efforts to link the opposition to the Kurdistan Worker's Party (PKK), designated a terror group in Turkey.
“Erdogan has been quite successful in convincing Turkish voters, or the majority of them, that there is a link between the PKK and Kilicdaroglu, While we were expecting the first topic on the agenda would be the economy and inflation rates, Erdogan managed to change the agenda,” he told The National.
“Many people bought this idea that integrity of the state is under threat.”
Secondly, he said, was the opposition's diverse six-party alliance, which, although it endorsed Mr Kilicdaroglu as its presidential candidate, is composed of a number of parties with varying political views, some of which are significantly more right-wing than the CHP.
“Erdogan is a strong candidate, and the opposition had seven or eight figures, including for vice-president. Again, he seems to have persuaded voters that there would be a crisis and governance problems if the opposition won.”
Despite the result, EU leaders have praised Turkey for the record turnout.
“It's a very clear sign that the Turkish people are committed to exercising their democratic rights to go and vote and that they value the democratic institutions,” said European Commission President Ursula von der Leyen.
Mr Erdogan has been building up to this election for years, with both he and his rival touring the country, including earthquake-hit areas, to drum up votes.
With only two weeks until voters return to the polls, they may focus on the urban centres of Istanbul, Ankara and Izmir — often decisive in calling the election — to turn the tide in their favour.
More decisive, however, was the parliamentary vote which also took place on Sunday.
Media affiliated with the ruling Justice and Development party (AKP) proclaimed victory for Mr Erdogan in the parliament, which may give him an edge entering the second round of voting.
Galip Dalay, an associate fellow at Chatham House international affairs think tank, said Mr Erdogan's ruling alliance would go into the second round “with numeric and psychological advantages”.
“During the campaign period ahead of the run-off, Mr Erdogan is likely to emphasise stability as he already retains the majority in the parliament,” Mr Dalay told AFP.