Thousands of William Ruto's supporters filled the streets after the announcement was made

William Ruto’s victory in Kenya’s presidential election has been welcomed internationally despite a dramatic dispute over the result.

Mr Ruto narrowly beat rival Raila Odinga taking 50.5% of the vote.

The announcement was delayed amid scuffles at the results centre and allegations of vote-rigging by Mr Odinga’s campaign.

He has not yet spoken but an ally told the BBC that Mr Odinga did not find the result “acceptable at all”.

“It has no credibility because four of the seven [election] commissioners have said they did not sign on to the announcement that Mr Ruto was lawfully elected,” Salim Lone said.

He was referring to the fact that the commissioners had refused to endorse the presidential result, saying the way it been handled was “opaque”. They did not give any further details on Monday.

Calm has returned to most parts of the country after a mixture of celebration and violent protests after the results were declared.

In Mr Ruto’s home town of Eldoret in the Rift Valley, thousands of residents broke into song and dance. But the mood was different in Mr Odinga’s political base in the western city of Kisumu where residents set up burning tyres and barricades to protest the loss.

Most shops remain closed in Kisumu.

In his acceptance speech Mr Ruto called for unity, saying he wanted to be a president of all, and for the country to focus on the future.

“To those who have done many things against us, I want to tell them there’s nothing to fear. There will be no vengeance. We do not have the luxury to look back,” he added.

He also lauded electoral commission chairman Wafula Chebukati for conducting a transparent election.

Mr Chebukati said he had done his duty despite receiving threats.

This was the first time Mr Ruto, 55, had run for president. He has served as deputy president for nine years, but fell out with President Uhuru Kenyatta, who backed Mr Odinga to succeed him.

The 77-year-old former prime minister, who got 48.8% of the vote, was running for president for the fifth time.

Mr Ruto had framed the election as between “hustlers” – poor Kenyans – and “dynasties” – influential families like the Kenyattas and Odingas who have been big players in the country’s politics since independence.

Unlike previous elections, the campaigns were dominated by issues like how to address the cost of living, fix the economy and fight corruption and not overt ethnic mobilising.

Analysts believe that Mr Odinga is likely to challenge the result.

The Kenyan Supreme Court annulled the last election and ordered a repeat – it might have to make another big decision in a few weeks.