Supporters of opposition leader Raila Odinga celebrate after hearing the verdict, on a street opposite the Supreme Court in downtown Nairobi, Kenya Friday, Sept. 1, 2017. Kenya's Supreme Court on Friday nullified President Uhuru Kenyatta's election win last month and called for new elections within 60 days, shocking a country that had been braced for further protests by opposition supporters. (AP Photo/Ben Curtis)
Supporters of opposition leader Raila Odinga celebrate after hearing the verdict, on a street opposite the Supreme Court in downtown Nairobi, Kenya Friday, Sept. 1, 2017. Kenya's Supreme Court on Friday nullified President Uhuru Kenyatta's election win last month and called for new elections within 60 days, shocking a country that had been braced for further protests by opposition supporters. (AP Photo/Ben Curtis) Credit: Ben Curtis

Nairobi — In a decision hailed as the first of its kind for Africa, Kenya’s Supreme Court on Friday annulled the president’s Aug. 8 re-election victory, citing irregularities, and ordered a new vote within 60 days.

The reversal of President Uhuru Kenyatta’s win stunned this country, East Africa’s economic powerhouse and a key U.S. ally in a fragile region. Analysts said it highlighted the growing independence of the courts, a major advance in a country that was effectively a single-party state until 1992. Some called the ruling a potential turning point for a nation where disputed elections have led to thousands of deaths in past years.

The 4-to-2 court ruling came in response to a petition filed by challenger Raila Odinga, 72, who alleged widespread fraud in the election.

Following the judgment, people in the court broke into cheers, with Odinga raising his fists in the air in celebration.

“This is indeed a very historic day for the people of Kenya and by extension to the people of the continent of Africa,” he said outside the courthouse. “For the first time in the history of African democratization, a ruling has been made by a court nullifying irregular election of a president.”

For his part, Kenyatta pledged to respect the court’s decision — but later assailed the judges. “They have been paid by white people and other trash,” he told supporters, adding that his party would watch the court’s moves. “Let’s move on,” he said. “But they will know we are also men.”

His comments raised concerns that there could be fresh violence if he does not win the new election. Kenyatta is the scion of one of the country’s most powerful political families; his father, Jomo, was a leader of the anti-colonial struggle that led to Kenya’s independence from Britain in 1963. Jomo Kenyatta became the country’s first president after independence, and Uhuru Kenyatta is only its fourth.

It is rare for a court in any country to throw out the results of a presidential election. But the ruling was particularly striking on a continent notorious for fraudulent and manipulated electoral processes. Just last month, Rwandan President Paul Kagame got nearly 99 percent of the vote in an election criticized as unfair by the United States.

In Kenya, Chief Justice David Maraga described the results of last month’s election as “invalid, null and void.” He promised to issue full details of the ruling later.

“Taking the totality of the entire evidence, we are satisfied that the elections were not conducted in accordance to the dictates of the constitution,” he said.

The court decision came as a shock to many Kenyans and foreigners alike. International observers, including former Secretary of State John Kerry, had said last month that the balloting appeared to be free and fair.

But the opposition presented evidence of numerous anomalies in the process of counting the votes and transmitting the totals to the regional and national electoral offices. Odinga’s lawyer said that some of the forms submitted with results lacked key security features such as watermarks and the necessary stamps and signatures, raising questions about their validity.

Tina Alai, a Kenyan expert in constitutional and human rights law, said the court ruling was significant in that it was not based on whether the irregularities were enough to change the result of the election. Instead, it focused on whether the electoral procedures met the constitution’s requirements to be accurate, verifiable and transparent.

“What the court made very clear today is that the constitution matters, the rule of law matters, the process of arriving at an election decision matters,” said Alai, who heads the Kenyan office of Physicians for Human Rights.

That is particularly important because of the country’s recent history of contested elections. Kenya is vastly more stable than war-torn neighbors Somalia and South Sudan. But it remains riven by tribal rivalries that come to a head at election time, largely between Kenyatta’s Kikuyu tribe and Odinga’s Luo community.