A senior police officer, who spoke on condition of anonymity, confirmed that two people had been killed in the slum of Mathare in Nairobi on Wednesday.
"They were part of a group that was protesting in the area and officers were sent to quell the chaos," the officer added.
"We are told many of them were also thieves who took advantage and could not even obey the police. Two have been fatally wounded."
Reports said one of the slain protesters was a young man that sustained a massive gunshot wound to the head.
Japheth Koome, police chief for Nairobi, said the two had attempted to "attack our officers with pangas (machetes)."
Police fired teargas and live bullets to disperse several demonstrations, which erupted in Nairobi as well as the western city of Kisumu on Wednesday, after Raila Odinga claimed that the results of Tuesday’s general elections were not reliable as the election commission’s voting systems had come under a cyber attack, leading to “massive and extensive” vote fraud.
According to unofficial results streamed onto the website of Kenya’s election commission (IEBC), Kenyatta was holding on to a commanding lead with 54 percent, while Raila Odinga has only secured 44.7 percent, with votes from over 96 percent of polling stations counted.
The protests took place despite Odinga’s call for calm.
The hacking claims prompted Kenya’s Election Commission to react and counter the allegations, assuring Kenyans that “all is well.”
The top opposition candidate, who is making his fourth presidential run, has further accused his rival of stealing victory from him through vote rigging both in the 2007 and 2013 polls.
In 2007, the disputed election led to two months of ethnically-driven political violence that killed nearly 1,100 people and displaced 600,000 others.