It ordered a new vote in 60 days.
The decision to cancel the result, the first of its kind in Kenya’s history, sets up a new race for the presidency between Kenyatta and veteran opposition leader Raila Odinga.
Kenya has a history of disputed elections. A row over the 2007 poll, which Odinga challenged after being declared loser, was followed by weeks of ethnic bloodshed in which more than 1,200 were killed.
“The declaration (of Kenyatta’s win) is invalid, null and void,” said Judge David Maranga, announcing the verdict backed by four out of the six judges and drawing cheers outside the court from Odinga supporters.
“The first respondent (the election board) failed, neglected or refused to conduct the presidential election in a manner consistent with the dictates of the constitution,” the judge said.
International observers had said they saw no sign of manipulation of voting and tallying at polling stations. Several observers said the opposition did not conduct a parallel tally and had not challenged results with complete data of their own.
Many voters in the west of Kenya, Odinga’s stronghold, and along the coast, where there is traditionally large support for the opposition, feel neglected by the central government and shut out of power.
“This indeed is a very historic day for the people of Kenya,” Odinga said after the decision. For the first time in the history of African democratization, a ruling has been made by a court nullifying irregular elections for the president.”
A lawyer for Kenyatta, Ahmednasir Abdullahi, said the decision was “very political” and the election board had “done nothing wrong.” But he said the decision had to be respected.
Odinga had contested the last three elections and lost each time. After each one, he claimed the votes were marred by rigging. In 2013, the Supreme Court dismissed his petition.
This time, his team focused on proving that the process for tallying and transmitting results was flawed, rather than proving how much of the vote was rigged.
Residents in the western city of Kisumu, where Odinga has strong backing, celebrated in the streets. Motorcycle drivers hooted their horns.
“Today is a special today and I will celebrate until I am worn out,” said 32-year-old Kevin Ouma.