Kenya’s Supreme Court has upheld President Uhuru Kenyatta’s victory in last month’s election re-run, which was boycotted by the main opposition.
Judges dismissed two petitions challenging the poll, opening the way for Mr Kenyatta to be inaugurated for a second term next week.
The opposition said the ruling had been given under “duress”, and it would not recognise the new government.
Mr Kenyatta won with 98% of the vote with turnout at 39%.
The poll was held after the Supreme Court annulled elections held in August, saying the poll was marred by “irregularities and illegalities”.
Civil society groups wanted the new poll to be annulled as well, arguing that the electoral commission had violated the law by failing to call for fresh nominations.
Handing down the verdict on behalf of six judges, Chief Justice David Maraga said: “The court has unanimously determined that the petitions are not merited”
The aftermath of the poll has been fraught with tension.
Last week, five people were killed as police tried to break up a convoy of the opposition National Super Alliance (Nasa) in the capital, Nairobi.
Nasa candidate Raila Odinga refused to take part in the re-run, saying the electoral commission had failed to take steps to ensure that mistakes of the August election would not be repeated.
“We in Nasa 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’s adviser, Salim Lone, said in a statement.