Egypt's new public prosecutor, appointed by President Mohamed Morsi last month, has resigned from his post, judicial sources and the main state newspaper al-Ahram reports.
The resignation of Public Prosecutor Talaat Ibrahim Abdallah on Monday follows a furore among members of the judiciary who said Morsi's decision in November to sack the former public prosecutor and appoint Abdallah was an assault on the independence of the judiciary.
A judicial source also told the AFP news agency that Abdallah had "submitted his resignation under pressure from protesters", referring to magistrates who have been clamouring for his immediate departure.
Al-Ahram said Abdallah's resignation would be presented to the Supreme Judicial Council on Sunday.
In his resignation letter, which was published by state news agency MENA, Abdallah said he wished to "return to his work in the judicial system."
Hundreds of public prosecutors staged a sit-in outside Abdallah's office in Cairo on Monday, demanding he resign. They said the president's appointment of Abdallah was improper, and that the Supreme Judicial Council should have been the one to nominate him, in order to ensure a separation of powers.
Morsi issued a declaration in November, giving himself greater powers and effectively neutralising a judicial system that had emerged as a key opponent by declaring that the courts are barred from challenging his decisions.
The decree, which dismissed Egypt's former public prosecutor, Abdel-Maguid Mahmoud, prompted nationwide protests.
Mahmoud rejected Morsi's decree, saying he was prepared to challenge it in court.
Morsi later annulled the decree, but ruled that a referendum on a draft constitution would still go ahead as planned.
The first round of the two-stage referendum was conducted on December 15 to be followed by the second on Saturday.
Mahmoud had served for many years under former President Hosni Mubarak who was ousted by a popular uprising in February 2011.