Kenya's President Uhuru Kenyatta addresses his supporters at Burma market after his election win was declared invalid by the Supreme Court in Nairobi, Kenya, September 1, 2017. But opposition leader Raila Odinga filed a petition to the court claiming that results from more than a third of polling stations were fatally flawed.
Speaking after the ruling, Mr Odinga described it as "a very historic day for the people of Kenya and by extension the people of Africa".
Hundreds of Raila Odinga's supporters have turned up on the streets of Nairobi to celebrate the Court's ruling.
The country was ravaged by post election violence in 2007, which left 1,200 people dead and another 600,000 displaced.
Last month's election was the fourth time Odinga lost his presidential run - he had also contested the last three election results but lost each time. It is not clear yet now what will happen in these coming 60 days since we no longer have a president elect nor a president.
But he also lashed out at the judges, saying "six people have decided they will go against the will of the people".More news: NASCAR playoffs: Standings, bubble drivers entering final regular-season race
More news: Wayne Rooney: 'Romelu Lukaku flawless player for current Manchester United side'
More news: Officer suspended for handcuffing nurse in blood row
Mr Odinga's lawyer said anomalies had affected almost five million votes.
The court found no misconduct on Kenyatta's part, but said Kenya's election commission had "failed, neglected, or refused to conduct the presidential election in a manner consistent with the dictates of the constitution". Paper forms that were supposed to match the electronic tallies were transmitted late or not at all, and court officials said some of them lacked official seals or had other irregularities.
It is believed to be the first time in Africa that a court has ruled against the electoral win of an incumbent based on a court challenge by the opposition.
A visibly fuming Kenyan president on Saturday hit out at judges' annulment of last month's poll results, which frustrated his hopes of reelection to a second term. Accompanied by his deputy William Ruto, President Kenyatta said they were ready to face off with Odinga and his running mate Kalonzo Musyoka.
The justices did not explain their decision but promised to issue their reasoning within 21 days. People on the ground before his decision we're adamant that they will not wake up to go to the polls again after doing it so recently.
A lawyer for the electoral commission, Paul Muite, had argued in a submission to the court that the irregularities were not enough to overturn the result.