CAIRO – Egypt's state prosecutor Abdel Maguid Mahmoud and President Mohamed Morsi agreed Saturday that Mahmoud will stay, ending a crisis over his refusal to quit after being dismissed, an aide to the prosecutor said. State television reported that the two met and sealed an agreement under which “the state prosecutor will stay on in his post,” said deputy state prosecutor Adel Said, citing a “misunderstanding over his nomination as ambassador to the Vatican.” Morsi Thursday fired Mahmoud, appointing him Cairo's envoy to the Vatican, but the state prosecutor refused to stand down, saying: “I remain in my post. According to the law, a judicial body cannot be dismissed by an executive authority.” The Islamist president's bid to remove Mahmoud bypassed checks on presidential control of the prosecutor, enraging judges after Morsi also unsuccessfully tried to reverse a court order disbanding the Islamist-dominated parliament. Morsi tried to remove the veteran prosecutor after this week's acquittals of Hosni Mubarak-era officials on trial for a deadly attack on protesters during the 2011 uprising that led to the long-time strongman standing down. The verdicts triggered protests which culminated Friday when supporters of Morsi clashed with his opponents in Cairo's emblematic Tahrir Square. The health ministry said 110 people were injured. Activists who played a central role in last year's anti-Mubarak protests say that Mahmoud was responsible for “weak evidence” provided by the prosecution in the case and is an old regime loyalist. Friday's protest was the worst violence over Morsi who emerged from the once banned but powerful Muslim Brotherhood to become Egypt's first Islamist and civilian president in June. Since then, however, he has been the target of much criticism from opponents ranging from Mubarak loyalists to groups which spearheaded the revolt. – Agencies