Egypt's supreme court has caused outrage by calling for the dissolution of the lower house of parliament and for fresh elections.
It has ruled last year's parliamentary election was unconstitutional, with one third of the seats "illegitimate".
The decision comes days before Egypt's presidential election run-off and has prompted fears that the military is planning to increase its power.
A Muslim Brotherhood politician said it would send Egypt into a "dark tunnel".
Its Freedom and Justice party won 46% of the vote in the three-month poll and senior Brotherhood figure Essam Al-Arian warned that the decision would leave the incoming president without a parliament or a constitution.
Islamist Abdul Moneim Aboul Fotouh, who took part in the first round of the presidential vote in May, said that dissolving parliament amounted to a "complete coup".
The Salafist Al-Nur party which has the second biggest representation in parliament said the ruling showed "a complete disregard for the free will of voters".
Parliament speaker Saad El Katatny was equally scathing, arguing that no-one had the authority to dissolve parliament.
The ruling military council (Scaf) is holding an emergency meeting to discuss the judges' decision.
The BBC's Jon Leyne in Cairo described the ruling as a "real bombshell" and said that Egypt's opposition was concerned about conflicting reports coming from the military council, including a suggestion that it was considering whether to take back the power to legislate and set up a committee to draw up a constitution.
In a separate ruling, the supreme court also decided that former Prime Minister Ahmed Shafiq could continue to run for president in the June 16-17 election, rejecting as unconstitutional a law that would have barred him from standing. Under the Political Exclusion Law, passed by parliament, senior officials from former President Hosni Mubarak's regime were banned from standing for office.
Mr Shafiq is standing against the Muslim Brotherhood's Mohammed Mursi in a tight run-off. He told supporters that the court had made a "historic ruling and verdict that meant there was no way for anyone to do particular laws for particular people."
While his supporters were delighted he could stand, protesters reacted angrily outside the court building, which was guarded by rows of police in riot gear and surrounded by barbed wire. Demonstrators shouted slogans and held posters demanding that Mr Shafiq be disqualified.
One activist, Mohamed Abdel Quodous, said Mr Shafiq was a "remnant of the old guard" and a "humiliation to Egypt and its revolution".
'Against the rules'
The court had been considering the validity of last year's parliamentary election, because some of the seats were contested on a proportional list system, with others on the first-past-the-post system. It decided that the election law had allowed parties to compete for seats reserved for independent candidates.
According to the official Mena news agency: "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 head of the supreme court Farouk Soltan told Reuters: "The ruling regarding parliament includes the dissolution of the lower house of parliament in its entirety because the law upon which the elections were held is contrary to rules of the constitution."
Many of the seats ruled unconstitutional were won by the Muslim Brotherhood.
But if parliament is dissolved, there will be uproar, the BBC's Jon Leyne says, because the Muslim Brotherhood has a majority of seats and will fear a worse performance in a re-run parliamentary vote.
Since the fall of Mubarak, Egypt's military has promised to hand power to an elected president by the start of July, but with no constitution and now the prospect of no parliament to write one, the new president is unlikely have his powers defined by the time he comes into office.