"We are not able to take ownership of the results that will be announced, because of the opaque nature of this last phase of the general election," she said.

The electoral commission has seven commissioners.

Diplomats and international observers were whisked out of the tallying hall before Chebukati spoke, as scuffles broke out.

Before announcing Ruto as the winner, Chebukati said two commissioners and the electoral commission's Chief Executive had been injured and were being treated.

Chebukati said Ruto had won 50.49% of the vote, against Odinga's 48.5%.

The winning candidate must get 50% of votes plus one.

Odinga did not attend the announcement.

Amid fears that vote-rigging allegations could lead to bloody scenes like those that followed presidential polls in 2007 and 2017, Cherera urged the parties to pursue any disputes through the courts.

Checks and Balance

The electoral commission has introduced many checks and balances to try to prevent disputes like those that led to violence in which more than 1,200 people were killed following the 2007 election. In 2017, more than 100 people were killed after the Supreme Court quashed the initial result over irregularities in the electoral process.

Kenya's dollar-denominated government bonds fell by as much as 2.9 cents on the dollar, Tradeweb data showed.

The next president will have to confront an economic and social crisis in East Africa's most advanced economy, where poor Kenyans already reeling from the impact of COVID-19 have been hit by global rises in food and fuel prices.

The worst drought for 40 years has devastated the country's north, leaving 4.1 million people dependent on food aid, while its debt levels have soared.

Kenyatta, who has served his two-term limit as president, fell out with Ruto after the last election and this time endorsed Odinga, making his fifth stab at the presidency.

In Kisumu, an Odinga stronghold in the west of the country, the reaction was immediate.

Several plumes of black smoke rose around a roundabout as people burned piles of tires.

Amid shouts of "We need Raila now!", "Chebukati must go!" and "No Raila, no peace!", motorcycle drivers honked their horns and people blew into vuvuzelas and whistles.

By contrast, the mood in Eldoret - Ruto's home turf - was ecstatic.

"We are very happy. I believe in the leader who was selected, I believe in the IEBC (the electoral commission)," said 25-year-old Eldoret resident Kenneth Kibitok.

"He is about the bottom up. People from down there will be up here," said Kibitok, who had spent all day on a stretch of Eldoret sidewalk popular with Kenyans who like discussing politics.