Egypt's controversial public prosecutor Abdel Meguid Mahmud said Friday he was to resign, days after being reinstated, citing possible conflicts of interest in future prosecutions.
A longtime prosecutor under former dictator Hosni Mubarak, Mahmud had been sacked by now deposed president Mohamed Morsi in November as part of a decree in which the Islamist head of state granted himself sweeping powers.
The decree was eventually repealed under intense pressure from street protests, but the decisions stemming from it were protected by the constitution that was passed in December.
Mahmud had filed a lawsuit against his sacking and the Court of Appeals ruled in his favour on Tuesday.
Signup to our newsletter and follow us on Facebook and Twitter!
His sacking had intensified long-running tensions between the presidency and the judiciary, which accused Morsi of interfering in its independence.
In a statement carried by state news agency MENA and verified by his office, Mahmud said he had filed the lawsuit against Morsi's decision "not to return to my post... but to stress the independence of the judiciary".
He said he would now ask the Supreme Judicial Council to approve "my return to the judges ranks".
"I feel uneasiness over what will be required in the future in terms of measures and rulings involving those who removed me from office," Mahmud said.
The military ousted Morsi on Wednesday.