Kenya election 2022: Supreme Court judges deliver boost for democracy
One of Kenya's most controversial politicians, Deputy President William Ruto will be in a strong position when he assumes the presidency, knowing that he has the seal of approval of the electorate, backed by the highest court of the land.
The Supreme Court upheld his victory in the 9 August election, with a unanimous judgement that left no doubt that he defeated his main rival, Raila Odinga, in a free and fair contest.
The judgement is proof that Kenya's courts are independent, and will safeguard democracy - just as they did in the last election in 2017 when they took the unprecedented decision to annul President Uhuru Kenyatta's victory following a challenge by Mr Odinga.
This time, the judges not only threw out Mr Odinga's case, but they chastised his legal team, saying the court had been sent on "a wild-goose chase".
Political analyst Javas Bigambo told the BBC that the legal process had boosted Kenya's democracy and proved that "in the end it is the people who decide who their leaders are".
Mr Odinga will now be under pressure to congratulate Mr Ruto on his victory. This would enhance his reputation as Kenya's "Father of Democracy", rather than coming across as a bad loser.
But his defeat is a political tragedy for him - and his supporters.
Mr Odinga was at the forefront of the campaign to end one-party rule in the 1990s, but he has never enjoyed the fruits of his struggle to become president, having lost in five elections.
In this, his story echoes that of his father, Jaramogi Oginga Odinga, Kenya's first vice-president, who also failed to rise to the presidency despite the role he played in the campaign against British colonial rule.
Mr Odinga's supporters had hoped that the family's contribution to the nation would finally be recognised with his elevation to the presidency in the 9 August election. The 77-year-old had previously said that this was his last stab at power.
"Fate has confined him in the same quarters that it confined his father. But he has no doubt contributed greatly to the improvement of the electoral process and cemented his significance in Kenya's politics," Mr Bigambo told the BBC.
While Mr Odinga could argue that previous polls lacked legitimacy, he cannot do so with the 9 August poll, as Chief Justice Koome was emphatic - there was no evidence of the result being rigged in Mr Ruto's favour.
She was also searing in her views on the four members of the election commission who disowned the result, pointing out that they had created unnecessary "drama" just before election commission chairman Wafula Chebukati announced the result.
"Are we to nullify the outcome of an election on the basis of a last-minute boardroom rupture whose details remain scanty?" the judges asked, adding that to annul the result would amount to upsetting the sovereign will of the people.
Mr Bigambo said the judgement indicated that teamwork in the electoral body was important and infighting gave the commission a bad image.
The judgement will certainly be a huge relief for Mr Chebukati, who can proudly say that he delivered a successful election, and withstood pressure to not declare Mr Ruto the winner by 50.5% of the vote to Mr Odinga's 48.8%.
In his speech shortly after the judgement Mr Chebukati said it was a "testimony that the commission conducted a free, fair, transparent and credible election that met the democratic aspirations of the people of Kenya".
Mr Bigambo said the verdict "gives Mr Ruto more confidence to preside over the affairs of the country, legitimately and legally elected".
Mr Ruto had been magnanimous in his victory speech on 9 August, saying he will strive to unite the nation after a polarising election, but he also referred to a "deep state" that had tried to block him from ascending to the presidency.
Mr Ruto did not identify who or what constitutes the "deep state", but it will come as no surprise if he carries out a purge of senior officials in the government and the security services who were seen to be loyal to outgoing President Uhuru Kenyatta.
Mr Kenyatta took the extraordinary step of backing Mr Odinga for the presidency, saying Mr Ruto could not be trusted with high office.
It led to a massive fall-out between the two men, raising questions about whether there will be a smooth transfer of power.
"This gives bearing on future presidents to be careful on who they prefer as their successor. Uhuru has been left with a bad taste in his mouth," Mr Bigambo said.
But the court's verdict makes it clear that power has sapped away from Mr Kenyatta - and Mr Ruto is the indisputable president-elect of Kenya.
In his speech after the court's judgement, Mr Ruto took an indirect swipe at Mr Kenyatta, but was also conciliatory.
"I haven't talked to him in months... I know he worked hard in his own way," he said, to laugher.
"I take no offence that he decided to choose and support somebody else and therefore we will remain friends," he said, adding that he would make a call to the president to discuss the transition.
Mr Ruto achieved a stunning victory in the 9 August election, gaining ground in Mr Odinga's political strongholds in western Kenya and winning by a huge margin in Mr Kenyatta's political backyard in central Kenya.
His success was down to the fact that he portrayed himself as a "hustler", fighting the attempt by two political dynasties - the Odingas and Kenyattas - to hang on to power.
His campaign struck a chord with many poor Kenyans, including the youth. He will have to now deliver on his promise to improve their lives - no easy task at a time when Kenya, like many other countries, is facing a cost-of-living crisis, massive unemployment, and a ballooning national debt.
- WILLIAM RUTO: A profile of the president-elect
- MARTHA KOOME: The women's rights campaigner who became chief justice
- UHURU KENYATTA: How Kenya's president divided his people
- CONTEXT: Seven charts that explain Kenya
- READ MORE: Full coverage