An Egyptian court Sunday ordered a retrial of ousted president Hosni Mubarak, granting an appeal of the former autocrat’s life sentence for failing to prevent the killing of more than 900 protesters during the 2011 uprising that forced him from power.

The court also overturned convictions for former interior minister Habib al-Adli and six other Mubarak-era security officials who stood trial alongside him last year. The latter six were acquitted, but all will be retried.

The ruling is unlikely to spark a public outcry. None of the defendants will go free, because of other pending cases. And both the defense and the prosecution had appealed the sentences.

Many Egyptians have complained that Mubarak’s trial was deeply flawed, marred by political loyalties in the court and an inept prosecution. Some activists hailed the retrial order as a small victory.

“The court’s ruling is a resuscitation of the revolution,” said Mohamed Adel, a leader of the 6th of April youth movement and a key organizer of the 2011 protests.

Egypt’s first democratically elected president, Mohamed Morsi, called on the attorney general’s office in November to open new investigations and trials for Mubarak, Adli and other former officials whose sentencing — and for some, acquittals — drew public accusations of being too light.

Activists and legal experts said retrials present an important opportunity to examine broader evidence that they say was neglected by a prosecution that was headed by a Mubarak appointee.

A fact-finding mission ordered by Morsi concluded this month that Mubarak had watched the uprising unfold from his palace on a live TV feed.

But others said a retrial could open the door to lighter sentencing for Mubarak and the others. “This is an attempt to escape punishment, because the general prosecution did not spend enough effort examining evidence,” said Ahmed Ezzat, a lawyer with the Association for Freedom of Thought and Expression, an Egyptian legal organization. “It means the criminal court’s verdict against Mubarak and Adli was deficient.”

The state-run Middle East News Agency reported that Sunday’s decision brought “a state of joy” to Mubarak supporters gathered in the court’s lobby.

Judge Ahmed Ali Abdel-Rahman also overturned convictions against Mubarak, his sons and a close associate, Hussein Salem, on corruption charges.

Mubarak’s sons, Alaa and Gamal, are also on trial for corruption.

Ingy Hassieb contributed to this report.