The man behind Mubarak's acquittal
His decisions helped his former president to escape prosecution for the deaths of protesters in 2011.
In Cairo's Tahrir Square during the January 2011 revolution, protesters held signs on which their demands were written, and pictures of people they wanted removed from power and prosecuted.
They included President Hosni Mubarak, Interior Minister Habib al-Adly, Prime Minister Ahmed Nazif and Prosecutor-General Abdel Meguid Mahmoud.
After Mubarak stepped down on 11 February 2011, leading figures from his regime were charged with corruption and murder. Mahmoud, on the other hand, would remain in his position for nearly two years, despite the change of government.
Near the end of 2012 the then-president, Mohamed Morsi, decided to remove Mahmoud and appoint him as Egypt's ambassador to the Vatican, an implicit dismissal.
There was widespread public anger after the October 2012 acquittal of officials and politicians involved in the case known as the "Battle of the Camels", when men on camel and horseback charged Tahrir Square protesters, killing nearly a dozen.
Mahmoud had led the prosecution.
Morsi reportedly felt that Mahmoud was a threat to both his rule and to the revolution that brought him to power.
On Saturday, Judge Mahmoud Kamel al-Rashidi, the head of Cairo's criminal court, endorsed a 2011 decision by his predecessor and cleared Mubarak of killing protesters as well as accusations of corruption, seemingly justifying that feeling.
In the original case, Mahmoud only indicted Adly, Mubarak's interior minister, and Adly's associates. Not until two months later was Mubarak added to the list of the accused.
Throughout and after the trial, Mahmoud's handling of the case was described as shoddy and slow.
Thus the case Rashidi examined in the appeals court this weekend was already weak, and the delay in the indictment prompted Rashidi to rule the charges against Mubarak "inadmissible".
|Mahmoud ignored evidence against Mubarak, calling only defence witnesses and excluding prosecution witnesses.|
In 2012, Mahmoud won an appeal against his dismissal by Morsi. He returned to the job six months after his initial exit, only to leave again a week later to become a judge.
Since the military coup in July 2013, Mahmoud has practically disappeared from public life. On 10 September 2014, the Supreme Judicial Council agreed to send Mahmoud to the UAE to work as a counsel in Abu Dhabi's Court of Cassation, the emirate's highest judicial institution.
In the three years after Mubarak's removal, Mahmoud has also faced allegations in the press of complicity and withholding evidence in the case of killing and injuring protesters, as well as intentionally ignoring hundreds of reports against corrupt officials while stalling investigations into Mubarak's associates. No formal charges have been brought against him, however.
Mahmoud also ruled in April 2011 that Mubarak could serve his prison time in the Sharm al-Sheikh international hospital, widely seen as a less punishing environment than any of Egypt's notorious jails.
This is an edited translation from our Arabic edition.