NAIROBI, Kenya (AP) — President Uhuru Kenyatta’s re-election victory last month was thrown out Friday by Kenya’s Supreme Court, which ordered new voting within 60 days in a stunning decision that plunged the East African country back into political chaos.

Kenyan Supreme Court judges, from left to right, Njoki Ndung’u, Jackton Ojwang, Deputy Chief Justice Philomela Mwilu, Chief Justice David Maraga, Smokin Wanjala and Isaac Lenaola preside to deliver the election petition judgement, Friday, Sept. 1, 2017 in Nairobi, Kenya. Kenya’s Supreme Court has overturned President Uhuru Kenyatta’s re-election dismissing backing a petition by veteran opposition leader Raila Odinga who claimed votes had been manipulated to deny him victory. (AP Photo/Sayyid Abdul Azim)

The move to nullify an election was unprecedented on the African continent.

It gave new hope to opposition candidate Raila Odinga, who had alleged the electronic results of the Aug. 8 balloting were manipulated. He had lost by about 1.4 million votes out of roughly 15 million cast.

Opposition leader Raila Odinga raises a fist as a sign of victory to his supporters as he leaves 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)

The court ruled 4-2 in Odinga’s favor, saying the electoral commission committed “illegalities and irregularities.” The court, whose full decision with details of its findings is expected to be released within 21 days, did not blame Kenyatta or his party.

Kenyatta said that while he respected the ruling, he “personally disagrees” with it. He urged calm in a country that has a history of postelection violence.

“Six people have decided they will go against the will of the people,” the president said, later telling his supporters that Chief Justice David Maraga “and his crooks” had taken away his victory. The official results had given Kenyatta 54 percent of the vote to Odinga’s 44 percent.

Kenya’s President Uhuru Kenyatta speaks to the nation in this image taken from TV, 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.(Kenya TV pool via AP)

Opposition members danced in the streets, marveling at the setback for Kenyatta, the 55-year-old son of the country’s first president, in the long rivalry between the country’s top political families.

“It’s a very historic day for the people of Kenya and by extension the people of Africa,” Odinga said. “For the first time in the history of African democratization, a ruling has been made by a court nullifying irregular election of a president. This is a precedent-setting ruling.”

No African country has annulled a national election due to irregularities, Ronald Slye, a law professor at Seattle University, told The Associated Press. Slye was among those who participated in Kenya’s Truth, Justice and Reconciliation Commission set up after violence killed more than 1,000 people following the 2007 election.

A supporter of opposition leader Raila Odinga celebrates after hearing the verdict in the Kibera Slums, in Nairobi, 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/Brian Inganga)

Electoral commission chairman Wafula Chebukati said personnel changes will be made before the new vote, and he said any employee found to be involved in manipulating the results should be prosecuted.

Odinga, 72, called for the election commission to be disbanded. He also said the role of international observers who came to Kenya for the vote must be examined because they put stability ahead of credibility and had “moved fast to sanitize fraud.”

The international observers, including former Secretary of State John Kerry, had said on election day that they had seen no interference with the vote. The Carter Center said Friday that Kerry’s mission had noted that “the electronic transmission of results proved unreliable.”

Supporters of opposition leader Raila Odinga celebrate in Uhuru Park, some carrying Kenyan flags and posters of Odinga, as they celebrate after hearing the verdict in 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)

After the court’s ruling, envoys from two dozen countries, including the United States, France and Germany, issued a joint statement that said the decision “demonstrated Kenya’s resilient democracy and commitment to the rule of law.”

“All electoral processes can be improved, and we will continue to support Kenya’s institutions in this important work,” the statement said.

Many countries, including the United States, had already congratulated Kenyatta.

Odinga, a longtime opposition candidate and the son of Kenya’s first vice president, had unsuccessfully challenged the results of the 2013 vote that Kenyatta won. Odinga’s supporters at first had said they would not go to court this time but filed a petition two weeks ago.

Supporters of opposition leader Raila Odinga celebrate in Uhuru Park after hearing the verdict in 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)

Kenya had been braced for further protests before the ruling, with police deployed to sensitive areas of the capital, Nairobi, and streets near the court were barricaded. Human rights groups have said that police killed at least 24 people in unrest after the election.

Instead, opposition supporters exploded in celebration.

“Thank you, Jesus!” one woman shouted. “I’m telling, God is on our side.”

“This has shown all (election) observers did not do their job. We want an apology,” said John Wekesa, who danced outside the court.

Tensions ran high when the official who oversaw the electronic voting system was found tortured and killed days before the balloting.

___

Associated Press video journalist Joe Mwihia in Nairobi contributed.