By Tom Perry
CAIRO (Reuters) - Egypt's top court ruled on Sunday that parliament's Muslim Brotherhood-led upper house was illegal but could stay on until elections, dealing the Islamists a moral blow but letting them keep their grip on lawmaking for now.
The decision resolves an area of legal uncertainty hanging over a political transition repeatedly upset by the courts.
The ruling by the Supreme Constitutional Court upheld the upper house's right, as set out in a new constitution, to legislate in the absence of a lower house. That chamber was dissolved last June following a similar legal challenge. Dates for new elections have yet to be set.
The upper house, elected as a consultative assembly on a 7 percent turnout, has angered the opposition by broaching areas of controversy since it assumed legislative powers in December.
These include a new civil society law criticized by human rights groups and the West as a threat to democratic freedoms, and proposals for judicial reform that are fuelling tensions between judges and Islamists who see the judiciary as hostile.
Analysts said Sunday's ruling seemed likely to irritate both sides in Egypt's political conflict: the Islamists would be angry that the chamber's legitimacy had been rejected, and the opposition would be annoyed that the house wasn't not dissolved.
"If the Shura Council still has legislative authority, then this is a moral blow but not a legal one," said Nathan Brown, a George Washington University professor and expert on Egypt.
The case against the upper house of parliament, brought by an independent member of parliament, follows a similar challenge that led to the dissolution of the Brotherhood-led lower house last year on the grounds of defects in the election law.
The Supreme Constitutional Court cited election law flaws as the reason for finding the upper house to be illegal. But it said implementation of the ruling should wait given the legislative role given to the chamber by the new constitution.
"The Shura Council is continuing to play its complete legislative role until the institutions of the state are completed and legislative power passes to the new parliament," the presidency said in a statement.
Mohamed ElBaradei, a leading opponent of the Brotherhood, assailed the court ruling as "an expected result of a low-level understanding and political thuggery that has toppled the concept of legitimacy and the rule of law".
COURT RULES AGAINST DEFUNCT ASSEMBLY
Court rulings, many of them against the Brotherhood's interests, have repeatedly turned the transition on its head.
The court also ruled as unconstitutional a provision used by President Mohamed Mursi to declare a state of emergency in three Suez Canal cities during violent protests earlier this year.
Last week, the Supreme Constitutional Court struck down parts of a revised parliamentary election law, casting doubt over the date of polls originally called by Mursi for February.
The Islamists believe the judiciary is stacked with Mubarak-era appointees dedicated to undoing its gains at the ballot box.
The issue came to a head in April when a party allied to the Brotherhood tabled a draft law that would have forced 3,000 judges into retirement. Mursi and top judges have agreed to seek a compromise, though some see it as only a temporary truce.
The Supreme Constitutional Court also ruled as illegal the rules that led to the selection of the assembly that drafted the new constitution, a controversial document fast-tracked into law by Mursi last year. But it said that this did not affect the legitimacy of the constitution "approved by the people".
Yasser El-Shimy, Egypt analyst with the International Crisis Group, said the court ruling would "further weaken the image of the Shura Council, as well as cast some doubt over the process by which the constitution was produced, and all of this is unwelcome for the Brotherhood".
(Writing by Tom Perry; Editing by Alistair Lyon)