Tonny Onyulo

Special for USA TODAY

NAIROBI, Kenya — At least three people were killed as violent protests broke out Wednesday after the losing presidential candidate charged that Tuesday's election results were hacked to hand a victory to incumbent Uhuru Kenyatta.

Supporters of Raila Odinga in this capital city — mainly its huge slums — burned tires, smashed shacks, blocked roads and threw stones at police, yelling, "no Raila, no peace.

Two protesters were shot and killed by police in the Mathare slum in Nairobi, local police confirmed. In the Kisii region in western Kenya, a police officer fatally shot a man outside a polling center. Police commander Abdi Hassan said the officer, who was manning the election office, is in custody.

“We are probing the circumstances which lead to the death of the man," he said.

Kenya has a history of violence marring disputed elections, and this one followed that pattern.

Official results released by the election commission with almost all votes tallied showed Kenyatta leading Odinga 54.3% to 44.8%, a margin of 1.5 million votes.

Odinga rejected the count, saying on Twitter that his party's assessment of the results showed he led the race by nearly 1 million votes. His claim was based on the fact that four of Kenya's six major tribes supported him, and Kenyans tend to vote based on their tribe.

"The fraud ... surpasses any level of voter theft in our country's history," he said. "This time we caught them."

Odinga charged that hackers infiltrated the election commission's database by using the identity of Christopher Msando, an election official in charge of the IT systems who was found dead last week. No one has been charged in the killing of Msando, who had torture marks.

Former U.S. secretary of State John Kerry, who is leading a mission of election observers here, said Kenya’s ability to secure its voting system “appears to be very, very strong.”

He spoke as Kenya’s election commission defended its electronic voting system Wednesday night, saying there were "no interferences before, during and after" Tuesday's vote.

Given Kenya's history of election violence, Nairobi has resembled a ghost town, with stores and offices closed. Residents stayed home or fled the capital for the countryside.

In 2007, more than 1,100 people were killed in post-election violence. Odinga, a former prime minister, lost that election, one of three defeats at the polls before this vote. He lost the 2013 vote to Kenyatta and challenged the results on a similar claim of vote-tampering. The Supreme Court ruled against him.

Kenyatta's Jubilee party denied any vote tampering. "You cannot claim the results are fake," Raphael Tuju, the party's secretary general, told the Kenyan newspaper The Star. "We would like to appeal for calm as it has been a very tough campaign and both sides invested a lot."

The Kenya Human Rights Commission said it was looking into discrepancies it found in the results.

Some civic groups joined Odinga in disputing the results. George Kegoro, who heads a voter education group, said the election commission failed to release totals from polling places as required by law. “The commission is deducting votes from opposition leader Raila Odinga and adding them to President Uhuru Kenyatta's tally,” he charged.

African Union election observers said they were satisfied the vote was free and fair, according to Kenyans.co.ke news website.

More:Kenyans choose next president in fiercely contested vote

More:Kenya's hotly contested presidential election marred by violence — once again

Wafula Chebukati, chairman of Kenya’s election commission, said Odinga's allegations will be investigated. “For now, I cannot say whether or not the system has been hacked,” he said.