Kenya's Supreme Court has ruled President Uhuru Kenyatta's election win last month as unconstitutional and is calling for new elections within 60 days, shocking a country braced for further protests by opposition supporters.
Kenyatta said he "personally disagrees" with the ruling on Fridau but respects it.
"Six people have decided they will go against the will of the people" he said while calling for peace in a country where past elections have triggered deadly violence.
No presidential election in the East African economic hub has ever been nullified.
Opposition members danced in the streets, marvelling at the setback for Kenyatta, the son of the country's first president, in the long rivalry between Kenya's leading political families.
"It's a very historic day for the people of Kenya and by extension the people of Africa," said opposition candidate Raila Odinga, who had challenged the vote. "For the first time in the history of African democratisation, a ruling has been made by a court nullifying irregular election of a president. This is a precedent-setting ruling."
The six-judge bench ruled 4-2 in favour of the petition filed by Odinga. He claimed the electronic voting results were hacked into and manipulated in favour of Kenyatta, who had won a second term with 54 per cent of the vote.
The court did not place blame on Kenyatta or his party. It said the election commission "committed illegalities and irregularities ... in the transmission of results, substance of which will be given in the detailed judgement of the court" that will be published within 21 days.
Commission chairman Wafula Chebukati said Friday they will make personal changes before the new vote, and he invited the prosecution of any staffer found to be involved in malpractice.
Odinga called for the election commission to be disbanded.
The lead counsel for the president, Ahmednassir Abdulahi, told the court that the nullification was a "very political decision" but said they will live with the consequences.
International election observers, including former Secretary of State John Kerry, had said they saw no interference with the vote.
Two dozen countries including the United States, which already had congratulated Kenyatta on his victory, issued a joint statement Friday saying the court's ruling "demonstrated Kenya's resilient democracy and commitment to the rule of law".