In another setback for Egypt's fledgling political process, elected officials have been disqualified and the lower house of parliament dissolved.
The court ruled on Thursday that one third of the seats in the Islamist-dominated parliament were invalid, stirring fresh uncertainty in the politically divided country.
The Supreme Council of the Armed Forces (SCAF), the country's ruling military council, then announced that if any part of the parliament is illegal, then the entire body should be dissolved.
Egypt's constitutional court also ruled against a law that would have barred deposed president Hosni Mubarak's last prime minister Ahmed Shafiq from standing in this weekend's presidential poll runoff.
After conflicting reports in Egyptian media over whether a third, or the entire, parliament was to be dismissed, Al Jazeera's Rawya Rageh obtained a copy of the court decision, which explicitly states that the entire parliament is dismissed because of "constitutional violations".
Separately, anonymous sources in the SCAF told Al Jazeera that the military body will regain legislative authority and form a new constituent assembly on Friday. Al Jazeera has been unable to confirm this from an official spokesperson in the SCAF.
The parliament had been elected on a complex electoral system in which voters cast ballots for party lists which made up two thirds of parliament, and also for individual candidates for the remaining seats in the lower house.
Ahead of the ruling, Judge Mohamed Hamad al-Gamal, a former head of the state council, said political parties should not have been allowed to run for the individual seats.
He also said half, rather than one-third of the seats, should have been apportioned to individuals.
"If it is proven that the election rules were flawed or unconstitutional, then the entire election process is void," Gamal said.
"It would mean that this parliament is unconstitutional, illegitimate and must be dissolved."
Shafiq welcomed the court rulings in a conference before his supporters, saying an "era of political score settling" was over.
"The message of this historic verdict is that the era of political score settling has ended," Shafik told cheering
crowd in Cairo. "The constitutional court has confirmed my right to participate in the election and reinforced the
legitimacy of this election."
Rawya Rageh said it was "really a victory speech ... addressing Egyptians almost as president and not as a candidate".
He praised the military, she noted, and said that the "era of fear-mongering was over".
At the same time, he also tried to reach out to supporters of opposition groups, notably the Muslim Brotherhood and liberal youth protesters.
Live Box 20111120475439857
Earlier, when it appeared that the court had dismissed a third of parliamentarians, speaker Saad al-Katatni, an Islamist, had said before the ruling that the parliament would have to consider how to implement it.
In the absence of a constitution, suspended after last year's overthrow of Mubarak, no authority had the right to dissolve parliament, Katatni said.
He said one possibility would be to hold by-elections for the seats ruled unconstitutional.
'Must be dissolved'
Seeking to derail presidential bids by senior Mubarak-era officials, parliament approved the law on April 12 to strip political rights from anyone who served in top government or ruling party posts in the last decade of Mubarak's rule.
After it became clear that the court was dimissin all parliamentarians, the Muslim Brotherhood's Mohamed El-Erian told Reuters that the ruling would plung the country into a "dark tunnel".
An administrative court had said in February that the election rules were unconstitutional.
In that vote, two-thirds of seats were allocated to parties and the rest to individuals who were supposed to be independent of any party.
Under Mubarak, the Supreme Constitutional Court used similar arguments to rule election laws illegal in 1987 and 1990, forcing the dissolution of parliament, overhauls of the electoral system and early elections.
The based on an informal deal negotiated between parties and the military council, a political deal that was never given formal approval from a court, Al Jazeera's Jamal Elshayyal reported from Cairo.
The decision to still allow Shafiq to run leaves many Egyptians wondering exactly what the revolution had achieved, aside from ousting Mubarak.
Thursday's judgement comes a day after the justice ministry issued a decree allowing military police and intelligence officers to arrest civilians suspected of crimes, restoring some of the powers of the decades-old emergency law which expired just two weeks ago.
Live Box 2011111713397233347
The controversial order was drafted earlier this month, but was not announced until Wednesday.
The decree applies to a range of offences, including those deemed "harmful to the government", destruction of property, "obstructing traffic", and "resisting orders".
Several of those provisions would allow the military to detain peaceful protesters. Rallies in Tahrir Square, for example, routinely disrupt traffic.
It will remain in effect at least until a new constitution is drafted, according to the ministry.
Source: Al Jazeera and agencies