An Egyptian court on Monday ordered the release of ousted president Hosni Mubarak over the deaths of protesters but he will remain in custody over fraud charges, state media reported.
The Cairo court ordered "the release of former president Hosni Mubarak, so long as he is not detained on other charges," the official MENA news agency reported.
The former president, who attended Monday's court session, will remain in custody pending investigation into separate corruption charges.
Mubarak, who ruled Egypt for three decades, was ousted in a popular uprising in 2011.
He has been under arrest since April 2011 charged with complicity in the murder and attempted murder of hundreds of peaceful protesters on January 25-31, 2011. He is also facing several charges of corruption.
Signup to our newsletter and follow us on Facebook and Twitter!
Defence lawyer Farid al-Dib made the case for his release on the grounds that Mubarak has spent two years in custody.
In January, Egypt's Court of Cassation ordered a retrial for Mubarak and Adly after accepting an appeal against their life sentences, citing procedural failings.
However the new trial was cut short on Saturday when the judge recused himself and asked the case to be passed to another court after a short but chaotic first sitting.
In October, the same judge had acquitted defendants in the infamous "Battle of the Camels" trial, who were accused of sending men on camels and horses to break up a protest during the 2011 uprising.
Mubarak appeared relaxed and comfortable at the retrial on Saturday, waving to supporters and chatting to his sons Alaa and Gamal, who are also on trial charged with corruption.