(CNN) -- Former Egyptian President Hosni Mubarak will remain behind bars, even though he won an appeal in which he asked to be released while awaiting a retrial, Egyptian state-run media said Monday.
An appeals court granted his appeal Monday, technically freeing him in the case involving the killing of nonviolent protesters during the 2011 uprising that brought him down. But that action was made moot when the court also ordered that he remain detained in connection with newer corruption charges that were added to the older allegations, state media said.
State media confirmed the court's orders Monday afternoon, after conflicting reports from state media and the country's Information Ministry about whether the orders were made.
The retrial was supposed to begin on Saturday, but was delayed after the judge recused himself and walked out, leaving the court without leadership. The appeals court has 60 days to appoint a new judge for the trial, lawyers said.
On Monday, Mubarak's lawyers petitioned an appeals court to release him, Egypt's semiofficial Ahram News Agency reported.
Egyptian law allows the justice system to detain prisoners for just two years pending trial, but courts may extend detention for short periods of time. Because of legal technicalities, Mubarak's two years recently ran out.
Mubarak, who ruled Egypt for 30 years with the help of the military, was found guilty in June 2012 of ordering the killing of protesters and was to serve a life sentence. But a court accepted an appeal, resulting in the retrial.
The judge did not give an official reason for recusing himself.
He used an Arabic term meaning he felt embarrassment or unease, which is a legal term judges use to declare that they are not fit to preside over the hearing.
Both Mubarak's lawyer and a lawyer representing families of victims said the judge recused himself for health reasons.
Others speculate that the judge stepped down because of intense criticism after he earlier exonerated several security officials who worked under Mubarak.
Judge walkout Saturday
A crowd of onlookers in the courtroom Saturday erupted in jeers when Judge Mustafa Hassan Abdullah stood up to leave the court after recusing himself. Police stepped in between the angrily gesturing crowd and the judge's bench.
Mubarak, who had arrived on a stretcher at the country's Police Academy in Cairo for the first day of his retrial, was quickly loaded back onto a helicopter, which flew him back to a military hospital.
He had appeared relaxed in court, where he lay on a gurney inside a cage, where incarcerated defendants are customarily held during trial in Egypt. He waved to the audience in the court multiple times.
Abdullah quit the case over a medical condition, Mubarak lawyer Farid El Deeb told CNN. But in announcing his departure, the judge also said he felt undue pressure in his position as magistrate.
Abdullah "submitted a medical report to the head of Cairo Cassation Court stating that he has medical problems with his eyes," El Deeb said. Egyptian law requires a judge to recuse himself publicly.
A lawyer for the families of those killed said he believed the judge held a legal bias in the case but also corroborated the medical reason for the judge's move. "There was also news that he had medical issues related to his eyes," Khaled Abu Bakr said.
Bakr and El Deeb told CNN that the court of appeals has 60 days to appoint a replacement judge. Mubarak is to remain in custody at a hospital, El Deeb said.
Victim's brother: 'Circus of a trial'
Dozens of relatives of those killed in Egypt's demonstrations gathered outside the court, state-run Nile TV reported. They were joined by hundreds of pro-Mubarak activists carrying signs of support.
Galal Faisal Ali, whose brother Naser was killed in the uprising, said he fears Mubarak will be found innocent.
"The government is not giving us the moral support we need, and they're allowing this circus of a trial to continue. We were hoping for a death sentence, but the way it's going, we may see Mubarak free, and his sons free, which means my brother died for nothing," he said.
Magdi Fouda, the main organizer of the pro-Mubarak protest, is a member of a group called "We are sorry, Mr. President." She was joined by a second group called "Sons of Mubarak."
"We are sure Mubarak will be pronounced innocent," she said.
State security forces formed a barrier between the opposing protesters.
Emotions ran high at Mubarak's original trial in 2012, resulting in scuffles between the two sides inside the courtroom and rioting outside.
Mubarak's two sons, six of his security aides and his former interior minister, Habib al-Adly, all face trial with him. The other defendants had also appeared at the criminal court inside the academy, state TV reported.
In addition to the charges related to the killings, all face charges of financial corruption and abuse of power.
Like Mubarak, al-Adly was found guilty in the original trial and sentenced to life in prison, but was granted a retrial after filing an appeal.
Prosecutors have added an additional corruption charge that was not part of the original trial. Mubarak is accused of selling natural gas to neighboring Israel for prices below fair market value.
Morsy pleased about second trial
Essam El-Erian, a senior adviser to Egyptian President Mohamed Morsy, said in January that the government looked forward to a second trial.
"God willed the retrial would take place under Morsy's rule, with new evidence and new defendants," El-Erian said.
Mubarak, who ruled Egypt for 30 years with the help of the military, was found guilty in June 2012 of ordering the killing of protesters and was immediately transferred to Tora prison in Cairo to serve his life sentence.
The 84-year-old has suffered a range of physical problems since he was driven from office in 2011, following weeks of protests by Egyptians demanding more freedom and reforms.
In December, Mubarak was transferred to a military hospital after suffering a head injury and a bruised chest when he slipped in a prison hospital bathroom, Egyptian state-run media reported.
CNN's Reza Sayah and journalist Mohamed Fadel Fahmy contributed to this report.
™ & © 2013 Cable News Network, Inc., a Time Warner Company. All rights reserved.