Egypt's top judicial body confirmed on Wednesday the reinstatement of public prosecutor Abdel Meguid Mahmud, piling the pressure on President Mohamed Morsi who sacked him in November.
The Supreme Council of Justice made the move a day after the Court of Appeal issued a "final decision" reinstating Mahmud, appointed at the time of ousted president Hosni Mubarak, to the post of attorney general.
His replacement Talaat Abdullah said in response that he "respects all judicial decisions," according to a statement released by his office.
Mahmud was dismissed in November by presidential decree.
The appointment of Abdullah, accused of being a supporter of the Muslim Brotherhood from which Morsi hails, had worsened a standoff between the Islamist president and the Egyptian judiciary.
Mahmud's reinstatement puts further pressure on Morsi, after the army issued him with an ultimatum to resolve the worst political crisis the country has seen since its 2011 revolution.
The powerful military has given Morsi until 4:30 pm (1430 GMT) on Wednesday to "meet the demands of the people" following four days of mass protests calling for him to resign.