Egypt's high court has overturned the only remaining conviction against Hosni Mubarak for graft and ordered a retrial in his embezzlement case.

The move opens the way for a possible release from jail for the ousted former president.

Mubarak, 86, was sentenced to three years in prison in May for diverting more than 100,000 Egyptian pounds ($14 million) worth of public funds earmarked to renovate presidential palaces and using the money to upgrade family properties.

His two sons, Alaa and Gamal, were given four-year jail terms in the same case.

The man who ruled Egypt for 30 years has been serving his sentence in a military hospital in Cairo.

Now that a retrial has been ordered, judicial sources say Mubarak could walk free as no convictions remain against him.

However, state media news agency MENA quoted an interior ministry source as saying Mubarak and his sons will remain in detention because the court did not order their release.

The decision to free Mubarak or his sons is now in the hands of the public prosecution or the court that retries them, the source said.

In November, another court dropped charges against Mubarak for conspiring to kill protesters in the 2011 revolt that toppled him from power, and cleared him in two other graft cases.

He faces retrial for a third and final time over charges of involvement in the death of demonstrators.

The decision to drop the charges in November sparked protests at universities across Egypt and prompted mockery online.

At least two people were killed and nine wounded when security forces fired tear gas and birdshot to disperse about 1,000 protesters trying to enter Tahrir Square, the symbolic heart of the uprising that ousted Mubarak.

The Court of Cassation, which ordered the retrial on Tuesday, did not say if Mubarak would be freed on bail pending his retrial in the outstanding cases.

But Mubarak's lawyer Farid al-Deeb told AFP that his client ought to go free as he "has already served" three years in prison.

Reuters/AFP