Violent protests erupted in Kenya after opposition leader Raila Odinga alleged fraud in the election. With results from almost all of the polling stations counted, President Uhuru Kenyatta was shown with a wide lead. Odinga claimed hackers used the identity of a murdered official to infiltrate the database of the country's election commission and manipulate results.

Soon after Odinga spoke on television, angry protesters in slums of Nairobi and the opposition stronghold of Kisumu in the southwest burned tyres, set up roadblocks and clashed with police. Dozens of residents gathered along a main road in Mathare and clashed with police who chased them back into the densely populated settlement that was a flashpoint in the 2007 election violence where around 1,200 people died.

Police said at least three people were killed as some slums in the capital, Nairobi, and other opposition strongholds erupted. Witnesses report that a man in Mathare slum was shot in the head by police. Nairobi police chief Japheth Koome said police had shot looters taking advantage of the protests.

Kenya election protests
The mother of a man allegedly shot in the head by Kenyan police covers her son's body in an alley in Nairobi's Mathare slum after unrest broke out a day following the general electionMarco Longari/AFP
Kenya election protests
The mother of a man shot in the head allegedly by Kenyan police reacts as she passes a police van transporting her son's bodyMarco Longari/AFP
Kenya election protests
A woman mourns the death of a protester in Mathare, in NairobiThomas Mukoya/Reuters

Police killed another person when they opened fire on protesters in another opposition stronghold in Kisii county, according to Leonard Katana, a regional police commander. The violence stirred memories of the unrest following the 2007 vote in which more than 1,000 people were killed. Odinga lost that election; he also lost the 2013 vote to Kenyatta and took allegations of vote-tampering to the Supreme Court, which rejected his case.

Kenya's interior minister, Fred Matiangi, warned against the use of social media to stoke tensions. Officials have said it was unlikely they would shut down the internet but said they might shut down some social media if necessary to calm hate speech and incitement.

Speaking at a news conference, Odinga urged his supporters to remain calm but added: "I don't control the people". His running mate, Kalonzo Musyoka, also called for restraint as the fraud allegations are investigated. "There may come a time we may have to call you to action," Musyoka said. "But for now it is important we be strategic as we delve deep into this matter."

Kenya election protests
Supporters of the Kenyan opposition presidential candidate protest in the Mathare slums of NairobiLuis Tato/AFP
Kenya election protests
A supporter of opposition leader Raila Odinga gestures in front of barricades in Mathare slum, in NairobiGoran Tomasevic/Reuters
Kenya election protests
A child looks on as residents attack a man for apparently belonging to a different tribe, in the Mathare slum of NairobiMarco Longari/AFP
Kenya election protests
Kenyan police arrive to break up a protest of supporters of the Kenyan opposition presidential candidate in the Mathare slums of NairobLuis Tato/AFP
Kenya election protests
A policemen fires a teargas canister in front of a burning barricade in Mathare slum, in NairobiGoran Tomasevic/Reuters
Kenya election protests
Anti riot policemen disperse protesters in Mathare, in NairobiThomas Mukoya/Reuters
Kenya election protests
Anti riot policemen disperse people from the street in Mathare, in NairobiThomas Mukoya/Reuters
Kenya election protests
Anti riot policemen beat one of the protesters to disperse them in Mathare, in NairobiThomas Mukoya/Reuters
Kenya election protests
Residents look on as Kenyan Administration Police officers patrol in the Mathare slum of NairobiMarco Longari/AFP
Kenya election protests
Supporters of opposition leader Raila Odinga set up flaming tyre barricade in Kibera slum in NairobiGoran Tomasevic/Reuters

Odinga, a former prime minister, blamed Kenyatta's Jubilee Party for the alleged hacking of the election database. "The fraud Jubilee has perpetuated on Kenyans surpasses any level of voter theft in our country's history. This time we caught them," he tweeted. He also posted online what he said were computer logs proving his allegation.

Odinga claimed that hackers used the identity of Christopher Msando, an election official in charge of managing information technology systems. On 31 July officials announced that Msando had been tortured and killed, alarming Kenyans who feared a recurrence of political violence that has been fuelled by ethnic divisions. An entry dated 8 August in the purported computer logs that Odinga posted on Facebook reads: "Login failed for user 'msando'. Reason: The password of the account must be changed." Rafael Tuju, a top official in Kenyatta's party, said the opposition's claims were unfounded.

Kenya's election commission said it will investigate Odinga's allegations. "For now, I cannot say whether or not the system has been hacked," said Wafula Chebukati, the commission chairman.

Kenyatta was leading with 54.35 percent and Odinga had 44.77 percent after votes at more than 39,320 of the 40,883 polling stations were counted, according to the election commission.

Police in the western Kenyan city of Kisumu used tear gas, live rounds and water cannon to disperse stone-throwing supporters of Odinga who had blocked roads into city slums with bonfires and boulders. The western port city on Lake Victoria has been a flashpoint in past elections. The city is home to a million people, most of them from Odinga's Luo tribe, who feel neglected by a central government led by Kenyatta.

Kenya election protests
Kenyan National Super Alliance (NASA) supporters hold rocks as they stand in front of a burning barricade on a road in KisumuKevin Midigo/AFP
Kenya election protests
Supporters of Kenya's National Super Alliance (NASA) shout slogans as they set fire to barricades in KisumuKevin Midigo/AFP
Kenya election protests
A demonstrator holds a tear gas canister he said was shot by Kenyan riot police in KisumuJames Keyi/Reuters