Updated

Egypt's state news agency says ousted President Hosni Mubarak's two sons have been ordered released on bail pending a retrial in a corruption case.

It is not clear when the Mubaraks will walk free. The court decision Thursday was not immediately implemented. A security official said time must be allowed for the prosecution to decide whether to appeal. There are also no legal grounds for the continued detention of Mubarak or his sons.

Alaa and Gamal Mubarak were sentenced to four years in prison on charges of using state funds to renovate family residencies. Their father got three years in the case.

The sentences were overturned earlier this month. The two sons face another trial on charges of insider trading, and another court had ordered their release pending trial.