Uhuru Kenyatta has won Kenya's presidential election despite facing an international crimes against humanity trial, provisional results showed on Saturday, as his main rival refused to concede, raising tensions following the key poll.
While supporters of Kenyatta, son of Kenya's founding president and one of Africa's richest men, danced in the streets, followers of his arch-rival Raila Odinga seethed at the results.
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 percent of the vote, according to the election commission figures, to become the African country's new leader 50 years after his independence hero father, Kenya's founding president.
The 51-year-old outgoing deputy prime minister -- charismatic, able to appeal to all classes and one of Africa's richest and most powerful men -- is the first man to win a presidency whilst facing trial in The Hague-based International Criminal Court (ICC).
But Odinga, the outgoing prime minister who trailed in second place in the vote, has not conceded defeat and is expected to challenge the results in court.
Kenyatta, whose first name means "freedom" in Swahili, beat 68-year-old Odinga on his third failed bid at the top job by over 800,000 votes.
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.
But Kenyatta, who won 6,173,433 votes out of a total 12,338,667 ballots cast, only just scraped through the 50 percent threshold needed to avoid a second-round runoff by just over 4,000 votes.
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.
Odinga took second place with 43.28 percent with a total of 5,340,546 votes.
Senior adviser Salim Lone said Odinga was "not conceding because this election was flawed," adding that he would contest the results at the Supreme Court but also sent a message to 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.
"We can't accept this - we are ready to die, we are ready for anything," said businessman Joshua Owino, a Luo like Odinga in from the western town of Kisumu, one of the worst hit places by violence five years ago.
"We can't take another 10 years of this -- why is it always just one tribe ruling?" asked motorbike taxi driver David Onyango.
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."
-- Celebration among fans, gloom amongst opposition --
A formal results announcement was expected later Saturday by the Independent Electoral and Boundaries Commission (IEBC) following a final "audit" of the figures.
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 now becomes Kenya's vice-president if results are confirmed, face crime against humanity trials over that violence before the ICC.
They face charges including orchestrating murder, forcible transfer and persecution in the aftermath of the 2007 elections.
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.
Kenyatta's trial has been set for July 9, while Ruto's begins on May 28.
The counting process for Monday's election was 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.
The vote tallying process was repeatedly criticised after an expensive electronic system to register and recognise voters -- and later to send results -- suffered widespread failure.