Kenya's Supreme Court has criticised the election board for failing to verify official results of last month’s presidential election before announcing them, but stopped short of saying there was rigging.

The court was offering a detailed ruling as to why it annulled the 8 August election and ordered a fresh presidential vote within 60 days. The 1 September decision was the first of its kind in Africa.

Election board officials had said incumbent President Uhuru Kenyatta won the contest by 1.4 million votes. Opposition leader Raila Odinga rejected that result and challenged it in the Supreme Court. He has also said the previous two elections were stolen from him.

Kenya has the region’s richest economy and is a key Western ally in a region often shaken by violence.

Its status as a diplomatic, trade and security hub for East Africa means the court’s ruling and the fresh election currently scheduled for 17 October are being closely watched for any sign of instability or violence.

On Monday, the French technology company supporting the election said it would be nearly impossible to be ready for that date.

The court on 1 September identified some procedural problems in a brief ruling but the key finding against the election board on Wednesday was that officials had announced results before being able to verify them.

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

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.

“If elections are not seen to be free and fair they can trigger instability. We do not need to look far for examples,” said Chief Justice David Maraga.

The board overseeing the 2017 vote did not have all the tally forms when they announced results, and some forms lacked security features like watermarks, signatures or serial numbers, calling their authenticity into question, the court said.

“The election did not meet the simple test,” said Mr Maraga. “We are unable to validate the result.”

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

“The (board) cannot therefore be said to have verified the results,” she said. “It is an inexcusable contravention ... of the election act.”

She also censured the board’s refusal to comply with court orders to open its computer servers, saying it meant that opposition claims of hacking or manipulation could be true.

“Noncompliance or failure by the board to do as ordered must be held against it,” she said.

But although the tallying process was questioned, voter registration, identification and voting all appeared to be “conducted in accordance with the law”, she said.

Opposition claims against Mr Kenyatta were largely dismissed. Mr Maraga said the opposition had failed to show evidence Mr Kenyatta had campaigned using state resources or undue influence.

As judges spoke, police also used tear gas to disperse groups of rival political supporters holding demonstrations outside the Supreme Court.

The election rerun has divided Kenya, with many opposition supporters celebrating it and the President and some members of the ruling party criticising it harshly.

On Tuesday evening, deputy president William Ruto tweeted: “So has CJ taken sides? Listening to the tone, language & drift of Maraga’s lecture the only phrase missing is NASA HAO! TIBIN! & TIALALA!” – phrases that are a rallying call for the opposition coalition.

Earlier, the Chief Justice told a news conference that judges were getting threats and the police were not offering adequate protection, an allegation that the chief of police denied.