Kenya Supreme Court has annulled the result of last month presidential election and ordered a new one within 60 days.
The ruling, citing irregularities, makes Kenya the first African country to invalidate a presidential poll.
The election commission had declared incumbent Uhuru Kenyatta the winner by a margin of 1.4 million votes.
But the opposition argued that the commission IT system had been hacked to manipulate the results.
After the ruling was announced, opposition presidential candidate Raila Odinga said: This is a historic day for the people of Kenya and by extension for the people of the continent of Africa.
Reading the decision reached by a majority of four to two among the judges Chief Justice David Maraga said the 8 August poll had not been conducted in accordance with the constitution.
The election sparked days of sporadic protests in which at least 28 people were killed.
The vote had raised fears of major political violence â€“ as was the case after a disputed election in 2007.