Kenya's Supreme Court has criticised the country's election board for failing to verify official results of last month's presidential election - which were later nullified over "irregularities and illegalities" - before announcing them.

The court, based in the capital Nairobi, offered a detailed ruling on Wednesday as to why it annulled the August 8 election and ordered a fresh presidential vote on October 17 after opposition leader Raila Odinga challenged the original result.

The election board had said incumbent President Uhuru Kenyatta won the contest by 1.4 million votes, but the opposition said the country's electronic voting system had been hacked and the results were doctored.

The board overseeing the 2017 vote did not have all the tally forms when they announced results, the court ruled on Wednesday. It also said that some forms lacked security features such as watermarks, signatures or serial numbers, which calls their authenticity into question.

OPINION: Can Kenya pull off a second election within 60 days?

"The election did not meet the simple test," said Chief Justice David Maraga. "We are unable to validate the result."

Maraga added: "If elections are not seen to be free and fair they can trigger instability. We do not need to look far for examples."

Deputy Chief Justice Philomena Mwilu said the forms should have been quickly available for inspection, noting officials had said that thousands of forms from polling stations were still unavailable four days after the official results were announced.

The fact that the Independent Elections and Boundaries Commission (IEBC) had refused the court full access to its computer system suggested opposition claims of hacking could also not be disproved, Mwilu added.

The IEBC's refusal to provide access to its servers "left the court with no option but to accept the claim that it [the result] was compromised," Mwilu said.

Although the tallying process was questioned, voter registration, identification and voting all appeared to be "conducted in accordance with the law," she added.

Claims against Kenyatta were largely dismissed by the Supreme Court as judges said the opposition failed to show evidence he had campaigned using state resources or undue influence.

Al Jazeera's Stefanie Dekker, reporting from Nairobi, said that it was expected that the court would point the fingers at the election board.

Expressing his displeasure with the court's ruling, Deputy President William Ruto tweeted: "Evidently a supreme coup on sovereign will of the people was executed on basis of technicalities against their verdict captured in ballots."

Kenya used two parallel systems: a quick electronic tally vulnerable to typos and a slower paper system designed as a verifiable, definitive backup. The official results were based on the electronic tally before the paper results were fully collated, the judges said.

READ MORE: A letter from Nairobi

The system was designed that way after a disputed 2007 presidential vote sparked violence that killed around 1,200 people and displaced around 600,000 more.

As the Supreme Court delivered its full judgement, police used tear gas to disperse rival groups of protesters who had gathered outside the courthouse.

Nairobi was tense this week ahead of the ruling, with police tear-gassing protesters and the US embassy urging calm.

US-based group Human Rights Watch (HRW) late on Tuesday urged police to protect the judges involved in the ruling.

Dismas Mokua, a political risk analyst, warned of the potential of a constitutional crisis in Kenya.

"The IEBC should now go through the Supreme Court verdict with great detail, identify the illegalities and irregularities and address those issues to be ready for another election," he told Al Jazeera.