NAIROBI — Kenya’s Supreme Court on Saturday unanimously upheld the election victory of Uhuru Kenyatta as the country’s president, dismissing allegations that the vote had been rigged.
But almost immediately, protests erupted in some opposition strongholds, with stone-throwing mobs squaring off against Kalashnikov-toting police officers. And Kenyatta’s legal battles are hardly over.
As Kenya’s next president, Kenyatta will soon be summoned to the International Criminal Court in The Hague to stand trial on charges of crimes against humanity, accused of using his vast family fortune to bankroll death squads during the chaos that exploded after Kenya’s last disputed election in 2007.
He says he is innocent and that the charges are based on gossip. But many Western officials believe otherwise, and the Obama administration has gotten off on the wrong foot, sending the signal that it hoped Kenyatta would lose.
The United States now may have little choice but to work with Kenyatta because Kenya is one of its closest allies in Africa, serving as a base for everything from running billion-dollar health programs to spying on agents of Al Qaeda. When it comes down to it, several analysts have said, the United States needs Kenya more than Kenya needs the United States.
On Saturday afternoon, in front of a hushed courtroom, Kenya’s chief justice, Willy Mutunga, read out the verdict upholding Kenyatta’s win, saying that the election, held nearly four weeks ago, had been conducted ‘‘in compliance with the constitution and the law.’’
The second-place finisher, Prime Minister Raila Odinga, seemed to finally swallow his defeat. Odinga had accused Kenya’s election commission of conspiring with Kenyatta to steal the vote. In the past week, in heated hearings in front of the Supreme Court, Odinga’s lawyers presented evidence of questionable vote tallying.
The Supreme Court concluded that there had been dozens of errors, though it appears the justices did not feel those errors would have changed the outcome — or they were wary of dragging out what had already become a long and tortuous election period.
On Saturday evening, in a room full of his supporters, Odinga mopped his face with a handkerchief and said, somewhat mournfully, ‘‘The court has now spoken.’’
He said he would abide by its decision, and he wished Kenyatta well.
A few hours later, Kenyatta spoke to the nation, saying, ‘‘I urge you to accept the election is over.’’ And he called for Kenyans to come together ‘‘above the partisanship.’’
Kenyatta, a son of Kenya’s first president and one of the country’s richest men, is expected to be sworn in on April 9. His running mate, William Ruto, soon to be deputy president, has also been charged by the International Criminal Court with crimes against humanity, accused of organizing young men to kill villagers during the last election.
The long-awaited verdict caps weeks, if not months, of distraction, anxiety, hope and dread. In 2007 and early 2008, Kenya cracked open in riots and clashes after Odinga lost the presidential race amid evidence of vote rigging, leaving more than 1,000 dead.
The horrific memories from that time have been fresh in the minds of many Kenyans. Many have feared that another contested election could set off the same type of violence.
On March 4, Kenyans streamed into polling places. The turnout was tremendous, around 86 percent.
But problems started almost immediately. A new biometric voter identification system failed, and then, after the polls closed, the electronic system to transmit results directly from the polling places to election headquarters crashed. Odinga’s side said it was a conspiracy. The election commission said it was an accident.
Election officials then had to tally the results manually, which took days and opened up more possibilities for fraud. On March 9, the election commission declared Kenyatta the winner. Odingafiled his lawsuit.
On Saturday night, after the Supreme Court upheld Kenyatta’s victory, protests broke out in several slum areas of Nairobi, the capital, and in Kisumu, Odinga’s ethnic stronghold. His supporters tried to barricade roads with burning tires, but police officers shot in the air and chased them away.