Egypt's supreme court has caused widespread alarm by calling for the dissolution of the lower house of parliament and for fresh elections.
Two days before Egyptians choose a new president, it has declared last year's parliamentary vote unconstitutional.
Muslim Brotherhood presidential candidate Mohamed Mursi said the decision "must be respected".
But other political figures have expressed anger amid fears that the military wants to increase its power.
Another senior Muslim Brotherhood politician, Essam Al-Arian, said the ruling on parliament would send Egypt into a "dark tunnel".
The Brotherhood's Freedom and Justice party won 46% of the vote in the three-month parliamentary poll and Mr 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 total coup, anyone who imagines that the millions of youths will let this pass is dreaming."
Protesters gathered in Tahrir square in the centre of Cairo after the ruling.
The Salafist Al-Nour 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.
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 presidential run-off 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 Mr 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."
Egypt's ruling military council (Scaf) held an emergency meeting after the two court rulings and later confirmed that the election would go ahead as planned, and urged Egyptians to vote.
But uncertainty about the intentions of the military had already been raised on Wednesday when the justice ministry announced that army personnel would have the right to detain civilians during the election period.
Addressing the fear that the military handover of power might be stalled, US Secretary of State Hillary Clinton told reporters "there can be no going back on the democratic transition".
Mr Mursi was guarded in his response to the court's rulings. "I respect the decision of the Supreme Constitutional Court in that I respect the institutions of the state and the principle of separation of powers," he told Egyptian TV, according to AFP news agency.
But in a later speech he appealed to voters, with a warning that the country was at a turning point: "a minority are trying to corrupt the nation and take us back. We will go to the ballot box to say no to those failures, those criminals."
'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 the one third of seats reserved for independent candidates.
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.