CAIRO (AP) -- A Cairo court on Sunday granted Hosni Mubarak's appeal of his life sentence, ordering a retrial of the ousted Egyptian president convicted of failing to prevent the killing of hundreds of protesters during the uprising that toppled his regime.
The ruling read out by judge Ahmed Ali Abdel-Rahman during the brief court session also overturned the conviction of Mubarak's former security chief, Habib el-Adly, who was convicted on the same charges and also sentenced to life in prison. He too will be retried.
Mubarak will not walk free, as he is being held while under investigation on other charges. The defendants were not present in the courtroom. The 84-year-old ex-president, currently in a military hospital, was reported last year to have been close to death, but the current state of his health is unknown.
A small crowd of Mubarak loyalists in the courtroom erupted with applause and cheers after the judge read his ruling. Holding portraits of the former president aloft, they chanted: "Long live Justice." Another jubilant crowd later gathered outside the Nile-side hospital where Mubarak is kept in the Cairo district of Maadi, where they passed out candies to pedestrians and motorists passing by.
Abdel-Rahman did not provide the grounds for his decision to grant the defense's appeal, but the reasoning behind his ruling was expected to be released later. No date has been set for the retrial.
Mubarak's defense lawyers had argued that the former president did not know of the killings or realized the extent of the street protests, but an Egyptian fact-finding mission has recently determined that he watched the uprising against him unfold through a live TV feed at his palace.
The mission's report could hold both political opportunities and dangers for Mubarak's successor, President Mohammed Morsi of the fundamentalist Muslim Brotherhood. A new Mubarak trial would be popular, since many Egyptians were angered he was convicted for failing to stop the killings, rather than ordering the crackdown.
But the report also implicates the military and security officials in the protesters' deaths. Any move to prosecute them could spark a backlash from the powerful police and others who still hold positions under Morsi's Islamist government at a time when the nation's new leader is struggling to assert his authority over a nation mired in turmoil.
Abdel-Rahman also granted the prosecution's request to overturn not-guilty verdicts on Mubarak, his two sons and an associate of the former president, Hussein Salem, on corruption charges. Salem was tried in absentia and remains at large to this day.
The judge also ordered the retrial of six of el-Adly's top aides who were acquitted in the same trial. Five of them were found not guilty of involvement in the killing of the protesters, while one was acquitted of "gross negligence." No date was set for their retrial either.
The six top police commanders held key positions at the Interior Ministry, which was led by el-Adly and which is in charge of the security forces. Their acquittal surprised many Egyptians who are still demanding retribution for the nearly 900 protesters killed during the 18-day uprising that culminated with Mubarak's ouster on Feb 11, 2011.
The prosecutors in the Mubarak trial complained that security agencies and the nation's top intelligence organization had not cooperated with their investigation, leaving them with little incriminating evidence against the defendants. During the trial, prosecutors focused their argument on the political responsibility of Mubarak and el-Adly.
Sunday's ruling came one day after a prosecutor placed a new detention order on Mubarak over gifts worth millions of Egyptian pounds he and other regime officials allegedly received from Egypt's top newspaper, Al-Ahram, as a show of loyalty while he was in power.
The public funds prosecutor ordered Mubarak held for 15 days pending the completion of the investigation. Mubarak, 84, was moved to a Cairo military hospital last month after slipping inside a prison bathroom and injuring himself.
Mubarak's sons, one-time heir apparent Gamal and businessman Alaa, are in prison while on being tried for alleged insider trading and using their influence to buy state land at a fraction of its market price.