Kenyatta, son of Kenya's founding president and one of Africa's richest men who faces an international crimes against humanity trial, narrowly got enough votes to avoid a second round runoff against arch-rival Raila Odinga.
But while Kenyatta supporters danced in the streets after the provisional results were unveiled, followers of Odinga seethed.
The reactions of the rival camps are being closely watched in Kenya, where deadly violence erupted after disputed December 2007 elections, shattering the country's image as a beacon of regional stability.
Kenyatta took 50.03% of the vote, according to the election commission figures, scraping by the 50% threshold needed to avoid a second round by just over 4 000 votes.
The 51-year-old outgoing deputy prime minister – charismatic and able to appeal to all classes – will become the first leader to take power whilst facing trial in The Hague-based International Criminal Court (ICC).
But Odinga, the outgoing prime minister in his third attempt at the top job, is expected to challenge the results in court.
Kenyatta received 6 173 433 votes out of a total 12 338 667 ballots cast, while Odinga got 43.28%, or 5 340 546 votes.
A formal results announcement was expected later Saturday by the Independent Electoral and Boundaries Commission (IEBC) following a final "audit" of the figures.
Excited crowds of thousands chanting Kenyatta's name poured onto the streets of towns across the country shortly after figures were released in the early hours of Saturday morning, dressed in the red colours of Kenyatta's party.
He and running mate William Ruto – who also faces an ICC trial later this year for violence after polls five years ago – said in a statement they were "proud and honoured for the trust being put on them" by the Kenyan people.
But Odinga was "not conceding because this election was flawed", his senior adviser Salim Lone said, adding that he would contest the results at the supreme court but also that Odinga was urging his supporters "to remain calm".
Concerns were high as to how Odinga loyalists will react, five years after a wave of bloodshed in which over 1 100 people were killed following disputed December 2007 elections.
'No Raila, no peace'
In the western town of Kisumu, an Odinga stronghold and one of the worst hit areas by violence five years ago, hundreds of youths chanted the slogan "no Raila, no peace" at armed police, but they later dispersed peacefully after appeals from community leaders.
"We can't accept this – we are ready to die, we are ready for anything," said businessperson Joshua Owino, a Luo like Odinga from Kisumu.
Police chief David Kimaiyo appealed for calm in a televised statement, telling Kenyans "to control our tempers, we need to control our disappointment, to accept the outcome of the elections in peace and the spirit of fair play."
Odinga also ran for president in 2007 and has always insisted he was robbed of victory, which went to his main rival Mwai Kibaki, who was backed by Kenyatta.
Both Kenyatta and his running mate William Ruto (46), who will become vice-president if results are confirmed, face ICC charges over the violence in the aftermath of the 2007 elections, including orchestrating murder, forcible transfer and persecution.
Both protest their innocence and have repeatedly said they would cooperate with the court, but Kenyatta will likely become the second African leader the ICC want to put on trial.
Sudanese President Omar al-Bashir faced trial on war crimes charges at the ICC when he was re-elected in 2010, but has always defied an arrest warrant from the court.
The counting process for Monday's election has been marred by technical problems and complaints from both sides.
Odinga's camp alleged that results had been "doctored", while Kenyatta's party raised concerns over the inclusion of spoiled ballots in the overall total.
The rigging claims, dismissed by Kenya's electoral commission, have added to tensions in a nation still scarred by the weeks of violence that followed the contested polls five years ago. – AFP.