Nairobi // Two protesters were shot dead by police in the Kenyan capital on Wednesday as rioting broke out after opposition claims of massive rigging in an election that President Uhuru Kenyatta looked certain to win.
Police fired teargas - and in some cases live bullets into the air - to disperse several protests, which erupted in opposition strongholds in Nairobi as well as the western city of Kisumu after opposition candidate Raila Odinga claimed a hacking attack had manipulated electronic tallying results.
Mr Kenyatta looked to have an unassailable lead, according to unofficial results streamed onto the election commission (IEBC) website, handing him 54 per cent compared to Mr Odinga's 44.7 per cent, with votes from over 96 per cent of polling stations counted.
The bloodshed comes a decade after a disputed poll, which Mr Odinga lost to former president Mwai Kibaki, led to two months of clashes that killed 1,100 people and left 600,000 displaced.
Decrying a "sham" tallying process, Mr Odinga detailed accusations of a major attack on the electronic system, saying hackers had gained entry using the identity of top IT official Chris Msando, who was found murdered and tortured late last month.
"This is an attack on our democracy. The 2017 general election was a fraud," Mr Odinga said, claiming detailed evidence of the hackers' movements.
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.
"You can only cheat a people for so long," he said.
A senior police officer confirmed two had been killed in the flashpoint Nairobi slum of Mathare. One of the was young man with a massive gunshot wound to the head.
"They were part of a group that was protesting in the area and officers were sent to quell the chaos," the officer.
"We are told many of them were also thieves who took advantage and could not even obey the police. Two have been fatally wounded."
Japheth Koome, police chief for Nairobi, said the two who were killed had tried to "attack our officers with pangas (machetes) and that's when the officers opened fire on them."
IEBC chairman Wafula Chebukati insisted the poll was "free and fair".
"As a commission we shall carry out investigations to establish whether or not the [hacking] claims are true," he said, adding that the IEBC had a week to release final results.
Raphael Tuju, secretary-general of Mr Kenyatta's Jubilee party, urged the opposition to "look at the figures soberly" and accept the results.
"You cannot claim that results are fake with respect to presidential vote and you welcome the areas where your governors and MPs have won convincingly. You have to accept the results however they come," he said.
Mr 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 in Kisumu and Mathare, burning tyres, setting up barricades and engaging in running battles with riot police.
"If Raila is not president, we can't have peace," one Kisumu protester said.
Kenyans head to the polling stations in fiercely contested election
Kenya opposition claims office raided by police
Resident Geoffery Omondi, 22 shook his head as protesters lit a new fire nearby. "It is very painful to watch. The problem is the IEBC who did not announce results well."
However the protests remained isolated, and in opposition strongholds where elections tend to stoke tensions.
Nevertheless the normally traffic-choked streets of Nairobi remained deserted as the country held its breath over the results.
The contest between Mr Odinga and Mr Kenyatta was seen by pollsters as too close to call ahead of the vote.
It is the second time the two men have faced off in a presidential election, a dynastic rivalry that has lasted more than half a century since their fathers Jomo Kenyatta and Jaramogi Odinga went from allies in the struggle for independence to bitter rivals.
The men belong to two of Kenya's main ethnic groups, Mr Kenyatta from the Kikuyu, the largest, and Mr Odinga from the Luo.
Both had secured formidable alliances with other influential communities in Kenya, where voting takes place largely along tribal lines.
In 2013 Mr Kenyatta won by 800,000 votes.
Mr Kenyatta, 55, is credited with overseeing steady economic growth of more than five percent. However food prices have soared under his watch and several major corruption scandals broke out in his first term.