(CNN) — Egypt's prosecutor general, appointed to the job just last month by President Mohamed Morsy, gave into demands of lower prosecutors by agreeing to resign next week.
The protesters converged on the prosecuting general's office at the High Court Sunday, refusing to leave until Talaat Abdallah resigned.
The siege by the prosecutors ended Monday when Abdallah signed a resignation letter that was then read to reporters. The letter will be delivered to Egypt's Supreme Judicial Council on December 23, the prosecutor's office said.
The prosecutors objected to Abdallah's appointment by Morsy because of his connection with the Muslim Brotherhood.
They became angry when Abdallah replaced attorney generals with judges affiliated with the Muslim Brotherhood.
The latest flare up happened last week when Abdallah transferred Attorney General Mostafa Khater, who had freed defendants arrested by Morsy supporters during clashes outside the presidential palace on December 5.
Morsy said in a televised speech on December 6 that the defendants confessed to being paid thugs, while investigations were still ongoing.
A document reportedly written by Khater referred to pressure by the prosecutor general to change the results of the investigations.
Khater's transfer was reversed a day later.