NAIROBI, Kenya — Kenyan opposition leader Raila Odinga on Tuesday shocked the country by withdrawing his candidacy for the fresh presidential election ordered by the Supreme Court, saying the election commission has not made changes to avoid the “irregularities and illegalities” cited in the nullified August vote.

Odinga’s legal challenge of vote-rigging had led the court to nullify the election that President Uhuru Kenyatta won with 54 percent of ballots. It was the first time a court had overturned the results of a presidential election in Africa. The court on Sept. 1 ordered a new election within 60 days. It is set for Oct. 26.

Odinga’s withdrawal created confusion in East Africa’s largest economy, with observers wondering how the new election might go forward.

Kenyatta said the election will go ahead, telling supporters that “there is nowhere the constitution says Raila Amollo Odinga has to be on the ballot.”

The election commission said on Twitter it was meeting with its legal team and “will communicate way forward.”

Odinga told supporters that Kenya’s election commission had “stonewalled meaningful deliberations” on reforms to ensure a credible vote. He warned that the upcoming election could be run worse than the first one, and he called for countrywide protests to urge reforms. The opposition called for protests Wednesday at the election commission headquarters.

In response, the commission tweeted a letter it sent Tuesday to Odinga’s opposition coalition saying “we have taken the necessary steps to guarantee the integrity of the fresh presidential elections.”

Analysts said Odinga’s withdrawal brings “constitutional uncertainty.”

Based on the Supreme Court’s decision, Kenyatta cannot run alone on the ballot or be sworn in automatically, said Ndungu Wainaina, executive director of the International Center for Policy and Conflict. The court ordered a fresh election between the original candidates of the Aug. 8 poll, and if that does not take place the court will annul results of the new vote because it did not abide by the order, he said.

Kenya is in “uncharted waters,” said Murithi Mutiga, senior analyst with the International Crisis Group. “The constitution is silent about what happens if the presidential election doesn’t take place after the court annuls the elections,” he said.

The public has been exhausted and polarized by the drawn-out campaign, he said. “Both the opposition and ruling party need to show greater responsibility to find a settlement that allows the country to move.”

Kenyatta must stop being a candidate and provide leadership, said lawyer George Kegoro, executive director of the Kenya Human Rights Commission. “We have entered into constitutional uncertainty. Uhuru Kenyatta has to wear his other cap as president and become the arbiter.”

The court in nullifying the August election cited illegalities and the election commission’s refusal to allow scrutiny of its computer system, saying the commission failed to disprove Odinga’s claim that hackers infiltrated the servers and manipulated the vote.

Kenyatta, called the Supreme Court judges “crooks” after their ruling, has said he does not want changes to the election commission. His Jubilee Party has instead used its parliamentary majority to push for changes in the electoral law ahead of the Oct. 26 vote.

The opposition says the changes are meant to make the transmission of election results a manual process that would have fewer safeguards against fraud and would make it more difficult for the court to annul an election.

“The only election the Jubilee administration is interested in is one that it must win, even unlawfully,” Odinga said.

Kenyatta has said that even if Odinga won the new election, the ruling party’s majority in parliament would impeach him.

The election had been seen as the last try at the presidency for the 72-year-old Odinga, a longtime candidate and the son of Kenya’s first vice president. He and Kenyatta, the son of Kenya’s first president, also faced off in a 2013 election marred by opposition allegations of vote-rigging.