Rallies in Kenya over alleged election fraud have turned violent, with protesters attacking polling stations and clashing with police officers. At least four people have been killed in election-related unrest in the East African nation.

The demonstrations broke out following the announcement of the results of the presidential election held on Tuesday. The current president, Uhuru Kenyatta, received over 54 percent of the vote. However, his opponent Raila Odinga claimed that the election results were hacked and falsified.

On Wednesday, violence flared in several cities, with angry protesters setting tires ablaze and blocking roads in the Mathare slums of the capital, Nairobi. Police deployed tear gas against the protesters, while a standoff near Mathare resulted in two deaths.

The two people who were killed tried to “attack our officers with pangas [machetes] and that's when the officers opened fire on them,” Japheth Koome, police chief for Nairobi, told AFP.

Demonstrators were heard marching through the streets of Kisumu, a Kenyan port city on Lake Victoria, chanting "No Raila, no peace," Reuters reported.

Unrest also broke out in the Tana River region in southeast Kenya. At least five knife-wielding men attacked a vote-tallying station and stabbed one man. The victim later died, Reuters reported.

Tension remains in Mathare slum, Nairobi, as people awaits for an official statement from their presidential candidate Odinga. #Mathare #Nairobi #Kenyaelections #Kenya A post shared by César Dezfuli (@dezfuli) on Aug 10, 2017 at 1:04am PDT

“Our officers killed two of them and we are looking for others who escaped,” said regional police chief Larry Kieng. “We have not established the motive yet, we don't know if it is political or if it's a criminal incident but we are investigating and action will be taken.”

Election commission head Ezra Chiloba has dismissed any claims of alleged election fraud.

"Our election management system is secure. There was no external interference to the system at any point before, during, and after voting," Chiloba told a news conference, as cited by Reuters.

On Wednesday, Amnesty International called on Kenyan police officers to use force only “as a last resort” during the protests.

“The police should not use force or firearms to break up peaceful protests. Force should only be used as a last resort, and even then only the bare minimum to prevent loss of life,” said Muthoni Wanyeki, Amnesty International’s regional director for East Africa, the Horn and the Great Lakes.