Kenya’s Supreme Court has upheld Uhuru Kenyatta’s presidential election victory, rejecting several petitions challenging the vote.
Chief Justice Willy Mutunga announced the decision, saying the poll was free and fair.
The appeal was lodged by PM Raila Odinga, Mr Kenyatta’s main rival in the presidential poll this month.
Official results said Mr Kenyatta beat Mr Odinga by 50.07% to 43.28%, avoiding a run-off by just 8,100 votes.
There is tight security at the Supreme Court. Violence after a disputed election in 2007 left more than 1,200 people dead.
The presidential, legislative and municipal elections held on 4 March were the first since the 2007 poll.
Mr Kenyatta and his running mate, William Ruto, are facing trial on charges of crimes against humanity at the International Criminal Court (ICC) for allegedly fuelling unrest after that election. They deny the charges.
Plea for calm
There was tight security for the court decision, with all roads leading to the building closed.
Police chief David Kimaiyo warned on Friday that unrest would not be tolerated.
He said: “We have reports indicating that some parties have organised their supporters to converge outside the Supreme Court during delivery of the ruling, and we will not allow any such gatherings.
“There will be tight security in all parts of the country, we will not tolerate any form of violence.”
Outgoing President Mwai Kibaki has urged people to stay calm and accept the result, but much will depend on Kenyans’ faith in their newly reformed judiciary, says the BBC’s Gabriel Gatehouse in Nairobi.
Lawyers for Mr Odinga said their petition to the Supreme Court included allegations of vote manipulation, as well as problems with the registration of voters and an electronic vote counting mechanism.
On Friday, the Supreme Court reviewed recounts from 22 polling stations. Both sides claimed that the recounts vindicated their position.
Mr Kenyatta has called the election, which was largely conducted peacefully, a “triumph of democracy”.
The Independent Electoral and Boundaries Commission (IEBC) has insisted that the vote was credible, despite technical failures with an electronic voter ID system and the vote counting mechanism.
International observers said the poll was largely free, fair and credible, and that the electoral commission had conducted its business in an open and transparent manner.