Kenya election: Uhuru Kenyatta wins presidency
Kenya's Deputy Prime Minister Uhuru Kenyatta has been confirmed as the winner of the presidential election, and vowed to work with his rivals.
He won 50.07% of the vote, officials said, narrowly avoiding a run-off.
But his main challenger, Raila Odinga, alleged massive fraud and said he would challenge the results of the "tainted election" in the Supreme Court.
Mr Kenyatta is set to face trial at the International Criminal Court over violence that followed the 2007 polls.
At the scene
Kibera slum is not normally considered friendly turf for Uhuru Kenyatta. Yet residents remained calm after the election of Kenya's richest man as their next leader. People are placing their faith in the new constitution and recent judicial reforms.
Raila Odinga is challenging the results in the Supreme Court and people say they will wait for the legal process to run its course.
Some point to the reforms as a reason for the relative calm compared with five years ago, when Kibera was a flashpoint. "Our behaviour is being shaped by the new constitution," said Steve, a Kibera resident.
But there are worries about the future. Many hope Mr Kenyatta will uphold the new constitution and continue to co-operate with the International Criminal Court, where he is fighting charges of crimes against humanity.
While the mantra across Kenya is "amani" (peace), some campaigners are warning against a "peace coma" - a failure to address past injustices which would prevent Kenya from moving on.
He is accused of fuelling the communal violence that saw more than 1,000 people killed and 600,000 forced from their homes.'System failures'
After the results were announced, Mr Kenyatta told cheering supporters he would serve all Kenyans "without fear or favour".
Speaking at the Catholic University in Nairobi, he called on Mr Odinga and other leaders to "join us in moving our nation forward."
Earlier, the Independent Electoral and Boundaries Commission (IEBC) said the latest elections had been complex, but also credible and transparent.
It said the turnout, at 86%, was the largest ever
IEBC chairman Issack Hassan praised the candidates who had already conceded victory and urged others to follow suit.
However, Mr Odinga, the current prime minister, said the electoral commission had "failed Kenyans" and that democracy itself was "on trial".
But after announcing his Supreme Court challenge, he also appealed for calm, saying: "Any violence could destroy this nation forever."
- Aged 51
- Son of founding President Mzee Jomo Kenyatta
- Heir to one of the largest fortunes in Kenya, according to Forbes magazine
- Entered politics in 1990s, groomed by former President Daniel arap Moi to be his successor
- Known as "njamba" ("hero") in his Kikuyu language
- Indicted by ICC on charges of crimes against humanity for 2007 post-election violence - which he denies
- Married father of three
The BBC's Gabriel Gatehouse in Nairobi says this was the tightest of races with the narrowest of margins.
He says that how Mr Odinga now handles his supporters will determine whether his dispute stays in the courts or spills out on the streets.Court process
Mr Kenyatta's Jubilee Coalition party said it was "proud and honoured for the trust" bestowed on it, adding that it had taken a message to the people and that "we are grateful to the people of Kenya for accepting this message".
Early on Saturday, small groups of Kenyatta supporters celebrated in Nairobi, hooting car horns and singing.
But the newly confirmed president could face difficult relations with Western countries.
In July, he is due to go on trial at the International Criminal Court (ICC) in The Hague for alleged crimes against humanity.
Mr Kenyatta's running mate, William Ruto, also faces similar charges. Both men deny the accusations.
In his victory speech, Mr Kenyatta restated his promise to co-operate "with all nations and international institutions".
The ICC has agreed to postpone Mr Ruto's trial by a month until May after his lawyers complained of not having enough time to prepare his defence.
- Votes cast: 12,330,028
- Uhuru Kenyatta: 6,173,433 (50.07%)
- Raila Odinga: 5,340,546 (43.31%)
- Turnout: 86%
Countries including the US and UK have hinted that Mr Kenyatta's election as president would have consequences for their relations with Kenya. The comments have been dismissed in Nairobi as foreign interference.
A new electronic system for transmitting vote results was designed to eliminate the risk of fraud, and thus avoid a repeat of the post-poll violence of 2007.
But the count has been plagued with technical glitches, including a programming error that led to the number of rejected votes being multiplied by a factor of eight.
Mr Odinga's Cord alliance had earlier complained that votes from 11 constituencies were missing, in effect leaving him more than 250,000 votes short.