An Egyptian court has ruled that the nation's Islamist-dominated legislature and constitutional panel were illegally elected.

Sunday's ruling by the Supreme Constitutional Court also said that the legislature must be dissolved when parliament's lower chamber is elected later this year or early in 2014.

The same court ruled to dissolve parliament's lower chamber in June, a move that led to the promotion of the toothless upper chamber, the Shura Council, to becoming a law-making house.

It was not immediately clear whether the ruling on the 100-member constitutional panel would cancel the constitution it drafted before its adoption in a nationwide vote in December. But even if it does not, the ruling will question the legitimacy of the disputed charter pushed through by allies of Islamist President Mohammed Morsi.