Protests began in response to the court's decision, although an opposition call for calm appeared effective
Kenya supreme court upholds Kenyatta's win in repeat election
Kenya's supreme court on Monday upheld president Uhuru Kenyatta's re-election in a repeat vote that the opposition boycotted while saying electoral reforms had not been made.
The decision appeared to put an end to a months-long political drama never before seen in Africa that has left dozens dead.
In a unanimous decision, the court dismissed challenges by human rights activists and a politician who argued that last month's election was not conducted according to the law.
Protests began in response to the court's decision, although an opposition call for calm appeared to have effect.
"We will not respect [Kenyatta] even after the court verdict. That was not an election and we will continue opposing him," said one resident of the opposition stronghold of Kisumu city, Wycliffe Onyango.
Live television footage showed Mr Kenyatta's supporters bursting into song.
"There is no perfect election. There will always be errors in elections, but you cannot invalidate an election unless those errors affect the outcome," said the country's attorney general, Githu Muigai.
The court in September nullified the August presidential election over irregularities, and ordered a new vote held last month. It was the first time a court in Africa had overturned a presidential election, and it kicked off months of uncertainty in East Africa's economic hub.
Opposition leader Raila Odinga, whose legal challenge led to the nullification, boycotted the repeat election and rejected Mr Kenyatta's overwhelming win. In some opposition strongholds, the repeat vote could not be carried out amid unrest.
Mr Odinga said the supreme court's decision on Monday was no surprise.
"We had repeatedly declared before this supreme court ruling today that we consider this government to be illegitimate and do not recognise it. This position has not been changed by the court ruling," Mr Odinga said.
The opposition leader said the court's decision was "taken under duress — we do not condemn the court, we sympathise with it".
He did not provide details. There had been concerns about intimidation of the justices, who failed to muster a quorum to decide on a last-minute petition that sought to postpone last month's election. One justice's bodyguard was shot and seriously wounded hours before the expected judgment.
Mr Odinga is now asking for international intervention as violent protests continue. Kenya "was being pushed to the precipice", he said on Sunday.
Dozens of people have been killed in clashes since the August vote. The majority of the nearly 100 dead are opposition demonstrators shot by police during protests.