Egypt's Supreme Court ruled to dissolve the Islamist-dominated parliament on Thursday, effectively erasing parliamentary gains made by the Muslim Brotherhood during the country's troubled transition to democracy.

The court ruled that one-third of the seats in the legislative body were invalid due to violations of electoral law.

Watch video 01:27 Egypt court says election is unconstitutional

In a further setback to the Islamists, the court ruled that the last Prime Minister under ousted President Hosni Mubarak, Ahmed Shafiq, could stay in the running for the presidential runoff election this weekend. He is going up against the Brotherhood's Mohamed Morsy.

Senior Brotherhood leader and lawmaker Mohammed el-Beltagy described the ruling on Thursday as a "full-fledged coup," carried out by a ruling military establishment seeking to maintain their grip on power.

"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.

Several hundred people gathered in Cairo's Tahrir Square after the rulings to denounce the action and protest against Shafiq, who is seen by critics as a symbol of Mubarak's autocratic rule.

Meanwhile US Secretary of State Hillary Clinton urged Egypt's military authorities to fully transfer power to a democratically elected government.

"There can be no going back on the democratic transition called for by the Egyptian people," Clinton told reporters. She refused to comment specifically on the court ruling, however.

Election 'unconstitutional'

Under the prevailing electoral system drawn up by the ruling military council, voters cast their ballots for both parties and independent candidates during the November-January parliamentary elections. The political parties were supposed to hold two-thirds of the parliamentary seats, while the remaining third was reserved for independent candidates.

Despite the rule, political parties ran candidates for the seats reserved for independent candidates. The Islamist Muslim Brotherhood and hard-line Salafist al-Nour party won 70 percent of the seats in parliament.

"The constitutional court affirmed in the details of its verdict that the parliamentary elections were not constitutional, and the entire composition of parliament has been illegitimate since its election," the official MENA news agency reported.

Legislative powers are to return to the Supreme Council of the Armed Forces (SCAF), which has governed Egypt since former president Hosni Mubarak was forced from power.

The court also ruled unconstitutional a political exclusion law for ex-Mubarak regime members. The law could have invalidated the presidential candidacy of Shafiq who served as Mubarak's prime minister shortly before the former president was forced to resign his post.

The presidential runoff is scheduled for June 16-17.

ccp/jlw (AFP, Reuters, AP)