Kenyan politician Raila Odinga rejected as a "travesty" the result of the presidential election he was declared to have lost to Deputy President William Ruto.

Mr Odinga has warned of a long legal crisis facing Kenya's democracy.

His first comments on the result came after four of the seven election commissioners said they stood by their decision a day earlier to disown figures announced by electoral commission chairman Wafula Chebukati.

The dramatic series of events has raised fears of violence similar to what followed disputed polls in East Africa's richest country in 2007 when more than 1,200 people were killed and again in 2017 when more than 100 people died.

Overnight, supporters of Mr Odinga battled police and burned tyres in the western city of Kisumu and the capital Nairobi's huge Kibera slum, but calm had returned to the streets by this morning.

"Our view is that the figures announced by Chebukati are null and void and must be quashed by a court of law," said Mr Odinga, a veteran opposition leader and five-time presidential candidate who was backed this time by outgoing President Uhuru Kenyatta.

"What we saw yesterday was a travesty," he told reporters, but appealed to his supporters to remain peaceful. "Let no one take the law into their own hands," he said.

Mr Odinga broadcast the dissenting commission members' news conference at his own venue before taking the stage. He said he was not yet prepared to announce specific legal steps.

He has until next Monday to file a challenge with the supreme court.

A supporter of Raila Odinga during a protest in Kibera, Nairobi

Speaking for the four commissioners, electoral commission deputy chair Juliana Cherera said the results showing Mr Ruto winning with 50.49% were erroneously aggregated and that Chebukati had disregarded concerns about the tally raised by other commissioners.

Ms Cherera later said that one of her main claims was based on a mathematical error. She had originally highlighted that the vote percentages for the race's four candidates added up to 100.01%, saying the additional 0.01% represented 142,000 votes, enough to potentially sway the election.

Mr Ruto defeated Mr Odinga by about 233,000 votes.

William Ruto (R) and Rigathi Gachagua (L) after the announcement of the election winner

Responding to a Reuters query, Ms Cherera later acknowledged that 0.01% of the 14.2 million votes cast was actually 1,420, but said the tally still showed a lack of quality control of the data.

Reuters was unable to reach the election commission's spokesperson for comment.

With memories still fresh of post-election bloodshed, Mr Odinga has faced calls from home and abroad to commit to resolving any concerns in the courts.

UN Secretary-General Antonio Guterres spoke with Mr Ruto today and hopes to speak with Mr Odinga tomorrow, UN spokesman Stephane Dujarric said, adding that Mr Guterres hoped the electoral process would be completed in accordance with the law.

US State Department spokesperson Ned Price urged parties to work together to "peacefully resolve any remaining concerns about the election" through existing dispute resolution mechanisms and called on political party leaders to urge supporters to remain peaceful.

"We hope to see that calm and patience prevail," Mr Price told reporters, adding that Washington will continue to be in close touch with Kenyan partners.