The Kenyan Supreme Court nullified on Friday the re-election of President Uhuru Kenyatta last month, ordering a new vote to be held within 60 days after a stunning decision that found that the election was tainted by irregularities.
The Aug. 8 election which was conducted peacefully, was thought to be Kenya’s freest yet and was largely praised by international observers. Yet, because the ruling might provoke violence, the authorities had also bolstered security in light of the contentious nature of the campaign, with tensions still running high and the country’s history of postelection clashes.
The court sided with opposition figures, who had complained about election irregularities and raised questions about the fairness and transparency of the vote. A top election official in charge of voting technology was murdered about a week before the election, and although the casting of ballots went smoothly, their collation and electronic transmission were flawed, leading the opposition to assert that as many as seven million votes had been stolen.
Mr. Kenyatta, 55, was re-elected with 54 percent of the vote, easily surpassing the 50 percent threshold needed to to avoid a runoff. His primary challenger, Raila Odinga, 72, who petitioned the Supreme Court to nullify the election, received about 44 percent, a difference of about 1.4 million votes. A parallel tally by domestic observers endorsed the official result.
Many Kenyans and observers were anxious about how the country would react to the ruling. Previous elections in 2007 and 2013, which the opposition also asserted were rigged, led to clashes that left hundreds dead. In the days after the election last month, at least 24 people were killed, most of them by security forces.
“My concern is that no matter what the court says, the losers will react violently,” said John Campbell, a senior fellow for Africa policy at the Council on Foreign Relations and a former ambassador to Nigeria, before the ruling.
Mr. Campbell expressed concern that “neither Kenyatta nor Odinga prepared their followers for the possibility of losing,” he said.
Both sides went to court holding strident positions: The opposition said it had evidence of “monstrous fraud and forgery” and the incumbent said it was “bullish and ready” to strike down its rival’s claims.
The seven judges sitting on the Supreme Court, which has bolstered its independence in recent years but is still viewed by many Kenyans as under government influence, were under pressure to lay out arguments that would be convincing to people on both sides, said Dickson Omondi, a country director for the National Democratic Institute, a nonpartisan organization that supports democratic institutions and practices worldwide.
The election controversy hinges on two paper forms that legally validate the ballots, one from each of the country’s 40,883 polling stations and the other from 290 constituencies. Representatives from rival parties were required to sign off on the forms before they were scanned and electronically transmitted to a national tallying center in Nairobi, where they were to be put online immediately so that they could be crosschecked by everybody.
But the electronic system, which had been overseen by Christopher Chege Msando, the election official who was murdered, broke down. As a result, only the results were sent to the national tallying center, often via text message.
International election observers were quick to praise the electoral body after the vote, mainly based on the apparent lack of evidence that votes had been tampered with at polling stations and that the paper forms, not the electronic transmission of results, reflected the integrity of the election.
But when Mr. Kenyatta was initially declared the winner, just hours after voting ended, almost none of the forms from the polling stations were online, even though it had a week to receive scanned images of the results. A couple of days later, the electoral commission announced that about 10,000 forms were unaccounted for, sowing even more doubt and suspicion over its credibility.
“The scenario was similar to that of the Bermuda Triangle where no one knows how ships disappear,” said Pheroze Nowrojee, a lawyer representing Mr. Odinga and the National Super Alliance, the opposition umbrella group.
The electoral commission claimed that it had presented the forms, cited in a report by the registrar of the Supreme Court. However, that report found that a third of the forms lacked security features like watermarks or serial numbers, which election observers say are evidence that the forms are likely false.
Mr. Kenyatta’s lawyer, Freg Ngatia, denied any wrongdoing, saying that what “had been presented as defective were correct and did not have any error.”
The opposition was also not given enough time to access, as ordered by the Supreme Court, the electoral commission’s servers, logs, and the electronic kits used to identify voters and transmit the results.
Walter Mebane, a professor of statistics and political science at the University of Michigan who studies elections worldwide, volunteered to run the voting results through a computer model he developed to detect electoral fraud. Based on statistics only, and without knowledge of the intricacies of Kenyan politics, he and his team found patterns that showed widespread manipulation.
“It was unlike any data set I had ever seen,” he said. “Every single indicator came up signaling anomalies. It’s a huge red flag that something weird is going on,” he said. His model found about 400,000 fraudulent votes, a significant number, he said, but probably not enough to swing the results. (More than a million votes would be needed to sway the outcome, he said.)
In the run-up to the Supreme Court hearing, Mr. Odinga, in an interview, said it didn’t matter whether the court ruled against him. The case was more of an opportunity to expose evidence of widespread rigging and to set a precedent for fair and free elections in the future.
Ultimately, the court’s ruling is a secondary issue, said Mr. Campbell, the former ambassador. “That’s almost beside the point,” he said. “It’s how people actually respond to it.”