With ballots from 92 percent of polling stations counted, electoral commission (IEBC) results showed Kenyatta leading with 54.4 percent of the nearly 14 million ballots tallied against Odinga's 44.7 percent, a difference of 1.3 million votes.
"These results are fake, it is a sham. They cannot be credible," Odinga told a press conference in the early hours of the morning as partial results fell quickly via an electronic tallying system aimed at preventing fraud.
"This is an attack on our democracy. The 2017 general election was a fraud," said Odinga, claiming detailed evidence of the hacker's movements. He would not say how he got the information, as he wanted to "protect his source".
Odinga claimed the IEBC had not provided the scanned forms meant to accompany the results.
Also Read
The 72-year-old, who is making his fourth bid for the presidency as the flagbearer for the National Super Alliance (NASA) coalition, accused his rivals of stealing victory from him through rigging in 2007 and in 2013.
In 2007, the disputed vote resulted in two months of ethnically driven political violence that killed 1,100 people and displaced 600,000, a major blow to a nation seen as a regional bastion of stability.
The contested election in 2013 was taken to the courts and ended largely peacefully, though Odinga lost.
Odinga urged his supporters to "remain calm as we look deep into this matter." But he added: "I don't control the people."
As his speech ended scores of supporters gathered at a roundabout in his western stronghold of Kisumu and began burning tyres. Riot police carrying shields, assault rifles and batons fired teargas and the crowd quickly dispersed, said an AFP reporter in Kisumu.
"The voters, too, must await the results while acknowledging that their favourite candidate can actually lose. It is a critical measure of democracy that there will be winners and losers," read an editorial in the Daily Nation newspaper.
The normally traffic-choked streets of Nairobi were largely deserted Wednesday, and some businesses remained closed as the country held its breath over the results.
Disclaimer: No Business Standard Journalist was involved in creation of this content