NAIROBI - Kenya's Supreme Court on Monday unanimously upheld William Ruto's presidential win in a scathing judgement that blasted opposition leader Raila Odinga's accusations of cheating.

Soon after, Odinga tweeted that he would respect the ruling even though he vehemently disagreed with it, easing fears that Kenya would see any repeat of the violence that followed disputed votes in 2007 and 2017.

Several public figures and anti-corruption campaigners - including some who had backed Odinga - welcomed the judgement, saying it bolstered the court's reputation for independence.

"This decision is good for the judiciary. This election result is bad for Kenya. Two things can be true at the same time," author Nanjala Nyabola tweeted.

There were no immediate signs of protest in Odinga's stronghold of Kisumu city or the low-income neighbourhoods of Nairobi that traditionally support the left-wing politician.

“There is nothing we can do, the judgment has been made,” Geoffrey Omondi, a 33-year-old electrical engineer who supported Odinga, said.

Ruto's jubilant supporters danced and waved flags in his party colours of yellow and green.

East Africa's most wealthy and influential nation had been on tenterhooks since the Aug. 9 elections, which pitted Ruto - a former chicken seller - against two of nation's two most powerful political families.

Similar accusations of cheating triggered deadly election violence, often with ethnic undertones, during the two previous polls.

SCATHING JUDGEMENT

"This court upholds the election of the first respondent (William Ruto) as the president-elect," Chief Justice Martha Koome, who heads the seven-member court, said in a televised judgement.

She left no ambiguity about the court's position on key arguments brought by Odinga's team and other complainants.

Koome dismissed affidavits alleging that polling stations results forms had been tampered with as "double hearsay" and containing forgeries. Another was described as "no more than hot air ... a wild goose chase".

"Some of the (computer) logs presented as evidence ... were either from logs arising from the 2017 election or were outright forgeries," she said.

Koome even raised the possibility of perjury, noting that two people who filed affidavits allegedly on behalf of polling stations agents had not spoken to the agents.

"Swearing to falsehoods is a criminal offence," she said.

She also called for reforms at the Independent Electoral and Boundaries Commission, saying that a "boardroom rupture" between the commissioners had undermined public confidence.

Four of the seven election commissioners disowned Ruto's win minutes before it was formally announced, saying the tallying process was opaque. But the dissenting commissioners had previously participated in the tallying without raising any concerns, Koome said.

“We uphold the Supreme Court decision,” dissenting commissioner Juliana Cherera told Reuters.

PERSONAL POLITICS

The history between Odinga, Ruto and outgoing President Uhuru Kenyatta underscores the tangled ties linking elite families and the primacy of personality over politics.

In 2007, Ruto was Odinga's vice presidential pick; Odinga claimed he was cheated of victory in that election, triggering violence that killed 1,200 people.

Both Ruto and Kenyatta were charged by the International Criminal Court for crimes against humanity linked to that violence; they then formed a joint ticket and won the 2013 elections. The cases against them were eventually closed.

Kenyatta and Ruto also won the 2017 elections, then fell out. This election Kenyatta endorsed Odinga instead of backing Ruto. Kenyatta is the son of the country's first president and Odinga the son of the first vice president.

Ruto, now a wealthy businessman, portrayed himself as an underdog battling the elite - a message resonating with chronically underemployed youth and families squeezed by global inflation and rampant graft.

Both sides have swapped corruption accusations and in July a court ordered Ruto's running to repay 202 million shillings ($1.7 million) as the proceeds of corruption. Ruto dismissed the judgement as politically motivated.

In 2017, the Supreme Court's judges became the first in an African nation to nullify a sitting president's win on procedural grounds; Kenyatta was forced to hold a re-run, which Odinga boycotted.

Ruto will be sworn in on Sept. 13.

(Additional reporting by James Macharia Chege, Humphrey Malalo, Aaron Ross and Ayenat Mersie Editing by William Maclean and Andrew Heavens)