Ruto scored 51.25 percent of the vote, reversing earlier gains for Odinga, who had 48.09 percent, according to figures from the Independent Electoral and Boundaries Commission.
Deputy President William Ruto is edging ahead of his main rival Raila Odinga in Kenya's presidential election, partial official results show, underscoring the tight race as the country anxiously awaits the final outcome.
Ruto scored 51.25 percent of the vote, reversing earlier gains for Odinga, who had 48.09 percent, according to Sunday's figures from the Independent Electoral and Boundaries Commission (IEBC), which has tallied results from nearly 50 percent of constituencies.
Ruto's party has already won the governorship of Kenya's capital Nairobi, the election commission announced, handing Ruto's party control of East Africa's wealthiest city.
Johnson Sakaja, a former senator for Nairobi, won the race, announced Nairobi county returning officer Albert Gogo.
Tuesday's vote passed off largely peacefully but with previous elections sparking violence and rigging claims, the IEBC is under intense pressure to deliver a clean poll and release results by Tuesday.
Riot police were deployed overnight inside the commission's heavily guarded tallying centre in the Kenyan capital Nairobi after political party agents disrupted the process, hurling rigging allegations at each other.
The commission's chairperson, Wafula Chebukati, accused party agents on Friday of delaying the tallying process by haranguing election workers with unnecessary questions.
Closely watched elections
The wait has left Kenyans weary, with many hoping that any disputes over the result are addressed peacefully through legal means.
The poll pitted Odinga, a veteran opposition leader now backed by the ruling party, against Ruto, who was widely expected to succeed President Uhuru Kenyatta until his boss joined hands with former foe Odinga in a dramatic shift of political allegiances.
The election is being closely watched by an international community that views Kenya as a pillar of stability in a volatile region, with US Secretary of State Antony Blinken describing the country's polls "as a model for the continent".
"We encourage peace and patience as the vote tallying continues from the August 9 elections," Blinken said on Twitter late Saturday.
Turnout was about 65 percent, much lower than the 78 percent recorded in 2017, a reflection, some observers say, of the disenchantment with the political elite, particularly among young people.
The winner of the presidential race needs to secure 50 percent plus one vote and at least a quarter of the votes in 24 of Kenya's 47 counties. If not, the country will be forced to hold a runoff within 30 days of the original vote.
Both frontrunners have pledged to ensure calm after the outcome is known, with Kenyans still haunted by the deadly violence that followed the 2017 and 2007 polls.