As well as ordering retrials for Mubarak-era officials responsible for violence during the uprising against his rule, the decree shielded from legal challenge an Islamist-dominated assembly writing Egypt’s new constitution.

It gave the same protection to the upper house of parliament, dominated by Islamists allied to Morsi, and assigned the president new powers that allowed him to sack the Mubarak-era prosecutor general and appoint a new one.

It stated that all decisions taken by Morsi until the election of a new parliament were exempt from legal challenge.

Presented as a move to “protect the revolution”, the decree won immediate praise from Morsi’s allies but stoked fears among secular-minded Egyptians that the Muslim Brotherhood and its allies aim to dominate the new Egypt.