Egypt's highest court on Sunday invalidated the Senate and a panel that drafted the constitution, undermining the Islamists' legitimacy in state institutions and throwing the country into fresh political uncertainty.
The Supreme Constitutional Court (SCC) said the law governing the elections of the Shura Council was unconstitutional, as were the rules for the selection of the members of a committee that drafted the constitution.
Presiding Judge Maher al-Beheiry said that the Shura Council should remain in place until the election of a new parliament.
Despite the ruling, the presidency said the Shura Council, a historically powerless body which was thrust into a legislative role when parliament was dissolved, would maintain its powers until a new lower house is elected later this year.
The Shura Council will "continue in its full legislative role until power is transferred to the new assembly," the presidency said.
As for the constitution, it will remain in place because it was adopted by a popular referendum.
The text, which was criticised by opponents of Islamist President Mohamed Morsi for failing to represent all Egyptians, was adopted by a popular referendum in December marked by low voter turnout.
"The constitution, which the people voted for and was approved by a majority, is the reference that must be applied, defended, protected and respected by all state institutions," the presidency said in a statement.
Sunday's ruling casts a dark shadow over the legitimacy of the Shura Council and the constitutional panel -- both dominated by Islamists -- which were touted by Morsi as shining examples of Egypt's new democracy.
The constitution was at the heart of a bitter conflict between Morsi's mainly Islamist supporters and his opponents who slammed the text for stifling freedoms and for not being inclusive.
The conflict had spilled out onto the streets causing the worst political polarisation since the popular uprising that toppled Hosni Mubarak in 2011.
"The decision seems to be what you get when the legal and political realms have become so intertwined with each other - a result of bad law and bad politics," said H.A. Hellyer, Fellow specialising in Egyptian politics at the Brookings Institution.
The SCC "issued a decision that met the political realities half way," Hellyer told AFP.
Signup to our newsletter and follow us on Facebook and Twitter!
Politicians who had boycotted the constitutional panel say they feel vindicated by the ruling.
The ruling against the constitutional panel "proves that our decision not to participate in it was right," said opposition figure Amr Hamzawy.
He and other opposition figures are now calling for a review of the constitution.
"It is time for amendments to the roots of this marred constitution, drafted by an illegitimate panel," Hamzawy said.
Leading opposition figure and former UN nuclear watchdog chief Mohamed ElBaradei echoed the view.
"Back to square one: Shura council & constituent assembly declared unconstitutional. Consensus on new constitutional frame work only way out," he said on Twitter.
The case against the Shura Council is based on several challenges by lawyers of the law that governed the election of its members.
Both the upper and lower houses were elected under the same electoral law, which the SCC last year deemed invalid, prompting the dissolution of parliament.
Ahmed Ramy, spokesman for the Freedom and Justice Party -- the political arm of the powerful Muslim Brotherhood -- said he believes the Shura Council should continue with its work "so as not to create a legislative vacuum."
But others disagree.
"The ruling means that the Senate must abstain from passing any law, because these laws would be contested," said Mustafa Kamel al-Sayyed, professor of political science at Cairo University.
"The fact that it remains in place is a conciliatory gesture," he told AFP.
The ruling creates a crisis for Morsi and his Muslim Brotherhood, Sayyed said, "because they wanted to use the Senate to pass several laws that they feel they could not in a new parliament," said Sayyed.