The judges said the election commission had failed to verify the numbers before declaring President Uhuru Kenyatta winner.
President Uhuru Kenyatta
Kenya's Supreme Court on Wednesday placed the blame for last month's annulled presidential vote firmly on the election commission, in its full ruling detailing the judges' decision.
Deputy chief justice Philomena Mwilu described "disturbing, if not startling, revelations" about the conduct of the Independent Elections and Boundaries Commission (IEBC) and singled it out for ignoring a Supreme Court order to open up its computer servers after opposition allegations of hacking.
The judges also said the election commission had failed to verify the numbers before declaring President Uhuru Kenyatta winner.
Computer hacking allegations were at the heart of the legal challenge from the opposition, led by Raila Odinga.
"Our order of scrutiny was a golden opportunity for the IEBC to place before the court evidence to debunk the petitioner's claim," Mwilu read from the court's detailed judgement on Wednesday.
"If IEBC had nothing to hide it would have readily provided access to ICT (information and communications technology) logs and servers to disprove the petitioner's claim. But what did IEBC do with it? It contemptuously disobeyed the court orders in these very critical areas."
Lawyers for Odinga's National Super Alliance (NASA) coalition, last month challenged Kenyatta's re-election, alleging rigging, hacking and tampering with results.
Chief Justice David Maraga declared the August 8, presidential election, and Kenyatta's victory, "invalid, null and void" on September 1.
ICT system infiltrated
Mwilu said that following the IEBC's refusal to comply with the court order, judges were left with no choice, but to determine that the election commission's "ICT system was infiltrated and compromised and the data therein interfered with, or IEBC officials themselves interfered with the data, or it had bungled the transmission system and were unable to verify the data."
The IEBC was also heavily criticised for failing to prove it had received tally sheets, known as forms 34A, from all 42,000 polling stations before declaring the final result on August 11, awarding Kenyatta victory with 54% of the vote.
Judges described the obscurity around the forms 34A as a "mysterious puzzle" that has not been solved.
They also questioned the absence of legally required security features, stamps and signatures on those forms that were eventually made public days after the declaration of results.
Judges on Wednesday also faulted the failure of the electronic transmission system, which relied on the availability of 3G or 4G mobile phone network to send scans of tally sheets as well as typed in figures.
The IEBC blamed network failures for missing and delayed tally forms, but the judges dismissed this excuse saying they should have been prepared.
"Failure of the electronic system was a direct violation of the law," Mwilu said.
"We find that the 2017 presidential election was neither transparent nor verifiable," leading to the unprecedented decision to nullify the vote, she concluded.
The election commission is due to hold a new presidential vote between Kenyatta and Odinga on October 17.
But Wednesday's detailed ruling, plus opposition demands for an overhaul of the commission and warnings from the French IT company that provided digital voting kits that it will not be ready on time, have raised fears that it will be impossible to meet that deadline.
Kenya's constitution says a new election must be held within 60 days of the court's annulment.