|Demonstrators protesting the election results set barricades on fire in Kisumu|
With 85% of polling stations reporting results by the early hours of Wednesday morning, incumbent President Uhuru Kenyatta was seen to be leading his main challenger Raila Odinga by 54.8% to 44.3%.
But Mr Odinga, a former political prisoner who unsuccessfully used the courts to contest his defeat in the last presidential election in 2013, dismissed the count as "fictitious" - with the opposition's own tally indicating he is winning.
In what he called an "attack on our democracy", Mr Odinga claimed hackers used the identity of murdered election official Chris Msando to "create errors" in the country's electoral database.
Demonstrators protesting the result in Kisumu, western Kenya, say police are shooting at them and using tear gas.
Reporting from Nairobi, Sky's Foreign Affairs Editor Sam Kiley said Mr Odinga's allegations "boil down to a claim that returning officers were supposed to submit a scan of their results to the Independent Electoral Boundaries Commission".
Opposition leader Raila Odinga has rejected the 'fake' result
"This, he said, allowed for manipulation by hackers who got into the national system overnight using Mr Msando's passwords and profile."
Kenya's election has been dogged by fears of another outbreak of violence similar to the one seen after Mr Odinga's election loss in 2007.
That crisis, fuelled by ethnic divisions, led to the deaths of about 1,200 people.
Kenya's President Uhuru Kenyatta has a comfortable lead in the polls
He is a member of the Kikuyu ethnic group, which has supplied three of the east African country's four presidents since it became independent from Britain in 1963.
Mr Odinga, 72, draws support from the Luo tribe, Kenya's second-largest ethnic group.
On Tuesday, Mr Odinga said he would accept an election loss "in the unlikely event that I lost fairly".
Of Kenya's population of 48 million, 19 million were registered to vote in elections that are also choosing members of parliament and local representatives in the country's devolved counties.