Supporters of Kenya's opposition celebrate in a Nairobi slum

Praise poured in Saturday for Kenya's judiciary after a historic ruling annulling presidential poll results, as attention turned to how discredited officials will organise a new vote in only two months.

Kenya's press and diplomats hailed the Supreme Court decision to annul last month's presidential poll as a hard-fought victory for the rule of law, and sign of a maturing democracy.

Pointing to widespread irregularities in the electronic transmission of vote results, Chief Justice David Maraga on Friday declared President Uhuru Kenyatta's victory "invalid, null and void".

He called for a new election by October 31 in an unexpected ruling in favour of veteran opposition leader Raila Odinga that stunned the nation.

An editorial in the Nation newspaper said the ruling "signalled the end of the era of impunity that has painfully assailed this country for too long."

"Kenyans have struggled for decades to institutionalise the rule of law. We have fought, shed blood, lost lives and property in search of constitutional order," the paper said.

"Intrinsic in this is the desire to establish independent institutions that provide checks and balances against each other."

Writing in the Star, the president of the Law Society of Kenya Isaac Okero said every election except that in 2002 had been plagued by "complaints, irregularities, suspicion of impropriety" that no court had been willing to properly tackle.

The paper's editorial said the decision "will reverberate for years to come in Kenya and around the continent".

A joint statement by ambassadors to Kenya praised "Kenya's resilient democracy and commitment to the rule of law."

The diplomats urged institutions to work to make the new election fair and credible, adding that "all electoral processes can be improved".  

- 'Unimaginable' task ahead -

It is the first time a presidential election result has been overturned in Africa. Similar court rulings have been seen in Austria, Haiti, Ukraine, Serbia and the Maldives.

The press also raised prickly questions about the weeks to come. 

Odinga has declared the loss of all confidence in the electoral commission (IEBC), and demanded its commissioners resign.

"How it will conduct the next elections in the next 60 days in unimaginable," said the Nation.

"Already the NASA (opposition) leadership has declared war on the commission and with or without that, its credibility has been severely dented and the public has lost confidence in it."

The Standard said the IEBC must "clean up house".

"What Kenya needs most now is an election conducted in a legal, fair and transparent manner."

- Kenyatta slams judges -

The opposition National Super Alliance (NASA) cried foul after the August 8 poll over alleged hacking of the electronic system transmitting results from over 40,000 polling stations to the national tallying centre.

NASA argued that tallying forms meant to back up the electronic result were riddled with irregularities, were unsigned, not stamped, illegible or lacking serial numbers or watermarks.

While Maraga cited "irregularities and illegalities" in the transmission of results, his full ruling has not yet been published.

Kenyatta initially said he "respects" the court decision even though he disagreed with it, however later, in off-the-cuff remarks to his supporters, he slammed the court judges as "crooks" who had been paid off by foreigners.

This after weeks of encouraging the opposition to turn to the judiciary over any complaints and accept the outcome.

Observers have warned that the new election could bring even more tension to a country where politics is largely divided along tribal lines.

"Kenya just had a difficult and controversial election, and this decision pushes it right back into another electoral campaign," said analyst Nic Cheeseman of the University of Birmingham.

"The outcome of the next election may be controversial again".

The Nation newspaper warned that there was still a long road ahead: "This is not the end. The toughest journey, campaigns and elections, is yet to begin."