Kenyan riot police charge towards opposition protesters during clashes in the Mathare slum of Nairobi, Kenya Thursday, Oct. 26, 2017. Opposition supporters boycotted Thursday's rerun of Kenya's disputed presidential election, clashing with police in some parts of the East African country and forcing authorities to postpone voting in areas affected by the violence. (AP Photo/Ben Curtis)
Kenyan riot police charge towards opposition protesters during clashes in the Mathare slum of Nairobi, Kenya Thursday, Oct. 26, 2017. Opposition supporters boycotted Thursday's rerun of Kenya's disputed presidential election, clashing with police in some parts of the East African country and forcing authorities to postpone voting in areas affected by the violence. (AP Photo/Ben Curtis) Credit: ap photographs — Ben Curtis

Nairobi — Kenya held a rerun of its botched presidential election on Thursday, but the opposition boycotted, and clashes broke out between police and protesters, threatening further political turmoil in one of sub-Saharan Africa’s key economies.

The incumbent, Uhuru Kenyatta, was viewed as almost certain to win because of a boycott by the leading opposition candidate, Raila Odinga. Odinga had claimed that it was impossible to hold a credible election and told his followers that they now were part of a “resistance movement” against what he described as Kenyatta’s dictatorship.

In parts of Nairobi and western Kenya on Thursday, Odinga’s supporters engaged in running battles with police, lobbing rocks at officers who responded with tear gas and, occasionally, live bullets. At least four people were shot and killed by police.

In yet another blow to the electoral process, election officials announced on Thursday that voting in four counties would have to be postponed until Saturday because of protests and violence. The delay extends a crippling period of uncertainty that already has ravaged the country’s economy.

Kenya has been seen as a maturing democracy and a key Western ally in a region troubled by war, undemocratic strongmen and an Islamist insurgency based in neighboring Somalia. But the past several months have cast doubt on the country’s political stability, with a widening gulf between two mostly tribal constituencies that have competed for power here for decades.

In September, the Supreme Court annulled the results of the previous month’s presidential election, which had put Kenyatta on top by about 10 percentage points. It was the first time that an African court ever had annulled the results of a presidential race, and many saw it as a triumph of judicial independence.

But that ruling set off one of the most tumultuous periods in the country’s recent political history, leaving many Kenyans with little faith in their nation’s ability to conduct a fair election. Even the chairman of the electoral commission expressed doubts that he could manage a credible poll. Another election official fled the country after receiving death threats.

Just before the Supreme Court was due to rule Wednesday on the prospect of another delay, which theoretically would have allowed time for more electoral reforms, the deputy justice’s bodyguard was shot. Remarkably, not enough judges showed up to issue a decision.

Even before this election cycle, Kenyan electoral politics were somewhat fragile. In 2007, a disputed presidential vote devolved into ethnic violence that left more than 1,000 people dead.

This time, the dynamic is different, as Kenyatta now has total control over Kenya’s security forces. That makes protracted mob violence less likely but raises the specter of more police killings.

Perhaps even more damaging, many Kenyans are likely to see Kenyatta’s reelection as illegitimate, a major blow in a country that has struggled to build faith in its public institutions.

“Kenya is at risk of losing much of what it has gained since 2008 unless it comes together at this crucial moment to preserve its democracy and fundamental freedoms,” said a statement from 15 Western ambassadors and mission heads in Kenya, including the U.S. ambassador.

Violence on Thursday was concentrated in opposition strongholds, particularly the western city of Kisumu, where three people were killed and 29 injured, according to the county governor.

In Mathare, a slum on the outskirts of Nairobi, witnesses said police charged into a crowd of protesters and started shooting live rounds. One man, Paul Oketch, 27, was shot in the head and killed.

“We tried to save him, but his pulse was already so weak when he arrived,” said Kennedy Odhiambo, a doctor’s assistant at Drugnet Medical Centre, a clinic in Mathare.