An Egyptian court ordered the release of former President Hosni Mubarak on Wednesday (August 21), a judicial and a security source said, meaning he could leave prison later in the day as there is no longer any legal grounds for his detention.

Mubarak, 85, is being retried on charges of ordering the killing of protesters during the 2011 uprising that led to his downfall.

However, he has already served out the maximum amount of pretrial detention permitted in that case.

Security sources said the court had met at Tora prison, where Mubarak is being held, to review a legal petition demanding freedom for the man who ruled for 30 years until he was overthrown as uprisings swept the Arab world in 2011.

Mubarak was sentenced to life in prison last year for failing to prevent the killing of demonstrators. But a court accepted his appeal earlier this year and ordered a retrial.

Presented by Adam Justice