CAIRO — Egypt’s presidential electoral commission on Tuesday permanently disqualified 10 candidates, including three front-runners, upending the contest just weeks before the vote and drawing accusations that the pillars of the Hosni Mubarak regime are still firmly in place.

The decision by a panel of Mubarak-era judges was expected to spark protests, especially from ultraconservative voters angry at the exclusion of their preferred candidate, Hazem Abu Ismail, who preaches a puritanical form of Islam known as Salafism. Hundreds of his rowdy devotees gathered at the commission’s headquarters Tuesday, chanting “God is great,” while security forces surrounded the building.

The move elicited sharp criticism of the generals who have ruled the country since Mubarak’s ouster in February 2011 and fueled allegations that they are working to ensure that Egypt’s first democratically elected president is someone over whom they will be able to exert influence.

The generals have pledged to cede power to a civilian government by the end of June. But Egypt’s transition — closely watched across a region that has been roiled by revolts — has been a bumpy one.

“This is a purely political, unjustified, illegal decision,” said Mourad Mohammed Aly, Shater’s media adviser. “I cannot say exactly who is behind this, but it’s very clear this committee is not independent.” He added that the generals are “not feeling comfortable with some strong candidates, and this is an indicator that the coming election will not be a free election.”

The decision takes the two leading Islamist candidates out of contention and leaves those voters who want a more prominent role for religion in public life to choose among several lesser-known candidates.

Among the remaining candidates, the leading contenders are Amr Moussa, the former Arab League chief who has consistently polled on top; Abdel Moneim Aboul Fotouh, a progressive Islamist and former member of the Brotherhood; and the Brotherhood’s backup candidate, Mohammed Morsi.

Although Moussa was part of the previous government, he is popular with Egyptians because of his hard stance toward Israel during his tenure as Mubarak’s foreign minister. He is also well known to the ruling generals and, analysts say, is probably their preferred candidate.

Candidates decry ruling

The decision announced Tuesday upheld the commission’s surprise announcement Saturday that 10 of 23 presidential candidates were ineligible to run. Abu Ismail, Shater, Suleiman and two other candidates had appealed the ruling, but the commission rejected their claims, according to state television.

Late Tuesday, Abu Ismail called for a sit-in outside the commission headquarters until he gets reinstated, but he urged supporters to be peaceful. Shater called on his backers to continue the revolution and to protest the commission’s decision. But he also urged voters to back Morsi, who leads the Brotherhood’s political wing, according to state media.

Ayman Elias, an aide to Abu Ismail, said in an interview that the generals “undoubtedly” barred him because they viewed the preacher, a fierce critic of the military, as a threat. The commission said Saturday that Abu Ismail was disqualified because his late mother was a dual American and Egyptian citizen; Abu Ismail has insisted that she did not hold U.S. citizenship.

“I think this will reach the level of revolution,” Elias said.

The commission is scheduled to present a final list of qualified candidates April 26. The election is set for May 23 and 24, with a second round the following month if no candidate gets more than 50 percent of the vote.

Suleiman, a late entrant in the race, was ruled ineligible because he fell just short of the requisite number of signatures supporting his candidacy.

Shater was disqualified because he had been a political prisoner under Mubarak. But his adviser said the ruling generals had pardoned Shater after his release from prison last year. The adviser said that those documents had been submitted to the body and that there was no reason to remove Shater from the race.

“My elimination from the elections despite the correctness of my legal position is proof that the Mubarak regime still rules,” Shater tweeted. “We will continue our peaceful struggle so that the Revolution is completed.”

Role of ruling generals

Khalil al-Anani, an Egypt expert at Britain-based Durham University who specializes in Islamist movements, said Tuesday’s ruling shows that, although Egyptians have embraced the idea of a post-revolutionary democracy, the generals have maintained a firm grip on power. “The only thing left for political forces is the street, which is also divided and fragmented over the future,” he said, adding that the military has “sabotaged and subverted the transition.”

The election commission’s decision comes on the heels of what critics say were attempts by the generals to control the constitution-writing process.

On Sunday, Mohammed Hussein Tantawi, head of the ruling military council, met with political parties to urge them to finish the constitution before the hand­over of power to an elected president June 30. He said the assembly tasked with writing the document should not include legislators, a move that would be yet another blow to the Brotherhood. Its political wing controls nearly half the parliament and had the most legislators on the original panel selected by parliament to draft the constitution. A court ruling disbanded that panel.

Michael Wahid Hanna, an Egypt expert at the New York-based Century Foundation, said the “general lack of transparency that has marked the transition” would raise questions about whether the election commission had been politicized. “We’ve seen that small sparks can precipitate larger clashes and larger bouts of violence,” he said. “That’s worrisome.”