Kenyan Supreme Court has said the electoral commission failed, neglected or refused to conduct the elections in accordance with the law.
Chief Justice David Maraga, announcing the ruling of four out of the six judges, said the irregularities compromised the integrity of the presidential poll.
"Elections is not an event but an process. After considering the totality of the entire evidence, we are satisfied that the elections were not conducted in accordance to the dictates of the Constitution and the applicable principles," CJ Maraga said.
The top court nullified the re-election of President Uhuru Kenyatta and ordered that fresh polls be conducted in 60 days.
The four judges who ruled that the results were "invalid, null and void" were CJ Maraga, his deputy Philomena Mwilu, Smokin Wanjala and Isaac Lenaola.
Judges Jackton Ojwang and Njoki Ndung'u dissented, while justice Mohammed Ibrahim, who fell ill on the second day of the election petition hearing, did not take part in the decision because he is still in hospital.
Justices Ojwang’ and Ndung'u said the petitioner, opposition National Super Alliance (Nasa) leader Raila Odinga, had failed to prove claims that the polls were rigged in favour of Mr Kenyatta.
The two said the polls were free, fair and credible as described by international observers.
Justice Ndung’u said challenges face every election and if they occurred, they were not deliberate or in bad faith.
Lawyers who represented President Kenyatta and the IEBC protested the judgment.
Lawyer Ahmednasir Abdullahi, for Mr Kenyatta, faulted the court, saying it had made a political decision because no one is disputing that the voter made his decision.
Nasa lawyers, led by James Orengo, were happy with the decision and thanked the court for agreeing with them that IEBC flouted electoral laws.
“The decision is history. The first judgement in Africa that has upset a presidential election. Supreme Court has done Kenya proud and lived up to the principle and law regarding election,” he said.
“The decision by the court means well have new presidential election within 60 days. We hope this time around, they will not make the mistake of generating elections through computers.”
“What IEBC did was treasonable because they wanted to declare the presidency against the Constitution. I don't think IEBC will preside over the election."