CAIRO, Egypt -- Egypt's top prosecutor reached an agreement with the country's president to keep his job on Saturday despite earlier attempts to remove him, ending a standoff that had prompted accusations of interference in judicial affairs.
President Mohammed Morsi had ordered Prosecutor General Abdel-Meguid Mahmoud to step down last Thursday in an apparent bid to appease public anger over the acquittals of ex-regime officials accused of orchestrating violence against protesters last year.
Morsi had broad public support for removing Mahmoud, who was appointed under ousted president Hosni Mubarak. But the move created a backlash from angry judges, who saw the decision as infringement on the judiciary.
Egyptian law protects the prosecutor general from being fired by the president. To overcome that constraint, Morsi had asked Mahmoud to become ambassador to the Vatican. But Mahmoud refused to be reappointed.
Vice-President Mahmoud Mekki told reporters after meeting the prosecutor that the president agreed to suspend the decision following a request from the country's Supreme Judicial Council.
After meeting Morsi and his advisers, Mahmoud told The Associated Press that "a misunderstanding" had been resolved.
Earlier Saturday, Mahmoud defied the order by entering his office in a downtown Cairo courthouse flanked by security and hundreds of judicial officials who came in his support.
Mekki said the procedures to reappoint Mahmoud have been stopped after the appeal by the Council. He said the decision was initially to avoid popular anger following the Wednesday acquittal of Mubarak loyalists over their alleged role in a turning point of the 2011 uprising, known as the "Battle of the Camel," when camels ridden Mubarak supporters charged into an opposition crowd.
Mekki dismissed accusations that Morsi was interfering in the judiciary. The move, he said, was to "protect the post" against criticism. In defence of the decision, Mekki said the presidency had announced the decision after initially understanding that Mahmoud had agreed to step down.
"There was confusion. The acceptance was not complete, was not clear," Mekki told reporters.
Mahmoud returned to his office after the meeting with Morsi. At a press conference later, hundreds of judges came out to congratulate him for retaining the job. Mahmoud said he had been threatened, a charge the presidency denies.
An independent daily's online headline read: "The judges win in the battle of the prosecutor general."