Judges appointed by Hosni Mubarak dissolved the Islamist-dominated parliament Thursday and ruled his former prime minister eligible for the presidential runoff election this weekend — setting the stage for the military and remnants of the old regime to stay in power.

The politically charged rulings dealt a heavy blow to the fundamentalist Islamic Brotherhood, with one senior member calling the decisions a "full-fledged coup," and the group vowed to rally the public against Ahmed Shafiq, the last prime minister to serve under Mubarak.

The decision by the Supreme constitutional Court effectively erased the tenuous progress from Egypt's troubled transition in the past year, leaving the country with no parliament and concentrating power even more firmly in the hands of the generals who took over from Mubarak.

Several hundred people gathered in Cairo's Tahrir Square after the rulings to denounce the action and rally against Shafiq, the presidential candidate seen by critics as a symbol of Mubarak's autocratic rule. But with no calls by the Brotherhood or other groups for massive demonstrations, the crowd did not grow.

Activists who engineered Egypt's uprising have long suspected that the generals would try to cling to power, explaining that after 60 years as the nation's single most dominant institution, the military would be reluctant to surrender its authority or leave its economic empire to civilian scrutiny.

mi-egypt-woman-cp-02805904

Egyptian protesters chant slogans against the country's military ruling council and presidential hopeful Ahmed Shafiq in Tahrir Square in Cairo. (Manu Brabo/Associated Press)

Shafiq's rival in the Saturday-Sunday runoff, Mohammed Morsi of the Muslim Brotherhood, said he was unhappy about the rulings but accepted them.

"It is my duty as the future president of Egypt, God willing, to separate between the state's authorities and accept the rulings," the U.S.-trained engineer said in a television interview. Late Thursday, he told a news conference: "Millions will go to the ballot boxes on Saturday and Sunday to say 'no' to the tyrants."

Senior Brotherhood leader and lawmaker Mohammed el-Beltagy was less diplomatic, saying the judges' action amounted to a "full-fledged coup."

"This is the Egypt that Shafiq and the military council want and which I will not accept no matter how dear the price is," he wrote on his Facebook page.

Equally blunt was another Brotherhood stalwart, lawmaker Subhi Saleh. "The court, I can say, has handed Egypt to the military council on a golden platter and free of charge too," he said.

In last year's parliamentary elections — Egypt's first democratic ones in generations — the Brotherhood became the biggest party in the legislature, with nearly half the seats, alongside more conservative Islamists who took another 20 per cent. It is hoping to win the presidency as well.

The rulings, however, take away the Brotherhood's power base in parliament and boost Shafiq at a time when the Islamists are at sharp odds with a wide array of major forces, including the military, the judiciary and pro-democracy groups behind the uprising.

On Wednesday, the military-appointed government gave security forces the right to arrest civilians for a range of vague crimes such as disrupting traffic and the economy that would give it a mandate to crack down on protests. Many saw the move as evidence that the generals aim to stay in power beyond the July 1 deadline they announced for handing it over to a civilian president.

Polarizing presidential race

All day Thursday, military armoured vehicles circulated through Cairo's streets playing patriotic songs as soldiers passed out leaflets urging passers-by to vote in the runoff election. Plastered on the side of their vehicles were posters saying "the army and the people are one hand."

After the court's decision was announced, a visibly energized Shafiq spoke at a rally that had the trappings of a victory celebration. Supporters chanted "We love you, Mr. President," and the 70-year-old candidate blew kisses to them. In his address, he praised the military and said he hoped for a dramatic change in the makeup of the next parliament.

"We want a parliament that realistically represents all segments of the Egyptian people and a civil state whose borders and legitimacy are protected by our valiant armed forces," said Shafiq, a longtime friend and self-confessed admirer of Mubarak.

Shafiq's opponents view him as an extension of Mubarak's authoritarian regime. Morsi's critics fears he and the Brotherhood will turn Egypt into an Islamic state and curtail freedom. Leftist, liberal and secular forces who launched the pro-democracy uprising bemoaned the choice, and some talked of a boycott.

Now they and the Brotherhood accused the military of using the court to change the rules of the game.

Controversial court rulings

In its ruling, the court said a third of the legislature was elected illegally, and as a result, "the makeup of the entire chamber is illegal and, consequently, it does not legally stand."

The explanation was carried by Egypt's official news agency and confirmed to The Associated Press by one of the court's judges, Maher Sami Youssef.

mi-ahmed-shafiqcp-02805423

Ahmed Shafiq addresses his supporters during an election rally in Cairo. (Nasser Nasser/Associated Press)

The law governing the parliamentary elections was ruled unconstitutional by a lower court because it breached the principle of equality when it allowed party members to contest a third of the seats set aside for independents. The remaining two-thirds were contested by party slates.

In a separate ruling, the court said Shafiq could stay in the runoff election, rejecting a law passed by parliament last month that barred prominent figures from the old regime from running for office.

Mubarak was sentenced to life in prison on June 2 for failing to prevent the killing of some 900 protesters during the uprising. About three dozen figures from his regime are also in prison, either charged with or convicted of corruption.

Defenders of the law argued that after a revolution aimed at removing Mubarak, parliament had a right to prevent regime members from returning to power. The law's opponents called it political revenge targeting Shafiq. The court said the law was not based on "objective grounds" and was discriminatory, violating "the principle of equality."

"This historic ruling sends the message that the era of score-settling and tailor-made law is over," Shafiq said at his rally.

Now, elections will have to be organized to choose a new parliament, and the Brotherhood is in a weaker position than it was during its powerful showing in the first election, held over three months starting in November 2011. 

A moderate Islamist and a former presidential candidate, Abdel-Moneim Abolfotoh, warned that the pro-democracy groups which engineered the uprising would protest the court's rulings.

"Those who believe that the millions of young people will let this pass are fooling themselves," he wrote on his Twitter account. Lobna Darwish, an activist and longtime critic of the military, said the rulings showed the entire electoral process was a "distraction" from organizing people in neighbourhoods to realize the goals of the uprising.

"The military ended up getting everything and we got nothing," she said.