By Tom Perry
CAIRO (Reuters) - An Egyptian court ordered the release of former Prime Minister Ahmed Nazif on Thursday because of a limit on pre-trial detention in a corruption case for which he had been held since the revolution that toppled Hosni Mubarak.
Nazif, who still faces a retrial, is the highest-profile Mubarak-era official to be freed in corruption cases which have failed to produce convictions that stick - prompting frustrated opponents of the old regime to criticize the justice system.
The court accepted an appeal lodged by Nazif, who was prime minister from 2004 until Mubarak replaced him during the uprising in January 2011 in an effort to appease public opinion.
A lawyer for Nazif, Mohamed Salah al-Buheiri, said he expected his client to leave prison by Saturday at the latest after two years and two months in detention.
Mubarak, a general who ruled for 30 years, is also in pre-trial detention: the life sentence he received last year for complicity in the murder of protesters was overturned in January on appeal.
The release order for Nazif, 60, is likely to fuel anger among opposition groups which are mobilizing for protests aimed at forcing President Mohamed Mursi from office one year since the Muslim Brotherhood politician took office on June 30.
"The problem is that they are being tried in the ordinary judicial system, according to laws made by Mubarak and his group," said Osama Diab at the Egyptian Initiative for Personal Rights, an independent rights organization.
"They were in control of the auditing agencies and had the ability to hide evidence," he added.
Nazif was sentenced to three years in jail in September for the unlawful possession of property and for making illegal profits from a public-interest company. Prosecutors accused him of making some $10 million from corrupt dealings. But that conviction was overturned in February and a retrial ordered.
In 2011, as protesters swarmed Cairo's Tahrir Square demanding change, Mubarak fired Nazif, who had worked closely with the president's son Gamal Mubarak in a program of liberal economic reforms. But that failed to defuse public fury.
"The court ruled that he be released as long as he is not wanted in other cases, and Dr. Ahmed is not wanted in other cases. He will be released, God willing, either today or Saturday," Buheiri said. Friday is Egypt's weekly holiday.
(Editing by Alastair Macdonald and Alistair Lyon)