Several thousand Egyptian Islamists rallied for an overhaul of the judiciary on Friday, after a court challenged a decision by Islamist President Mohamed Morsi to sack the veteran state prosecutor. Morsi's Muslim Brotherhood movement had called the demonstration outside the Supreme Court in central Cairo to demand reform of the judiciary, which has repeatedly challenged Morsi since he took office last June. "The people demand the cleaning up of the judiciary," the protesters chanted. A court last month overturned a controversial decree by Morsi to sack state prosecutor Abdel Meguid Mahmud, appointed by ousted president Hosni Mubarak, and replace him with Talaat Abdallah. The court believed Morsi had overstepped his powers when he sacked Mahmud, blamed for bungling the trials of former regime officials, including Mubarak himself, after the 2011 uprising. Morsi's supporters say many judges are Mubarak-era appointees who remain hostile to them despite their subsequent election victories. A court also overturned Morsi's calling of parliamentary polls for this month, ruling that he had ratified a new electoral law without consulting the constitutional court.