Former Egyptian President Hosni Mubarak waves to his supporters inside a cage in a courtroom at the police academy in Cairo April 13, 2013.A court in Egypt has overturned the convictions for embezzlement of former President Hosni Mubarak and his two sons and ordered a retrial.
Mr Mubarak was jailed for three years in May after being found guilty of fraudulently billing the government for $14m (£9.3m) of personal expenses, bbc.com reports.
But the Court of Cassation found legal procedures were not followed properly.
It was the last remaining case keeping Mr Mubarak behind bars. The 86-year-old has been in detention since April 2011.
Mr Mubarak's lawyer told the BBC he hoped his client would soon be released from Cairo military hospital, where is being held.
Charges of conspiring in the killing of hundreds of protesters during the uprising that ended his rule in 2011 were dropped in November.
The former president and his sons - Alaa, 53, and Gamal, 51 - were also cleared of two separate corruption charges.
Egypt's former president can now celebrate another legal victory.
After years of court cases, his last conviction has been overturned - though he faces a retrial. A handful of Mubarak loyalists cheered and shouted in court when his three-year sentence was quashed.
Even before today's verdict, his lawyers said he was entitled to be freed because he had already spent three years in prison, when pre-trial detention is included.
A source in the Egyptian prison service told the BBC the former president would be released, once they had calculated the days already served.
Legally he may be entitled to his freedom, but political considerations are likely to play a role.
If he reappears in public - just four years after the revolution which unseated him - it will deepen the divisions here, and could provoke fresh unrest on the streets.
That's something the current Egyptian leadership may prefer to avoid.
There's speculation that the former leader may opt to remain in the military hospital overlooking the Nile, where he has been serving his sentence. One newspaper report suggested his family was concerned about ensuring his safety outside the hospital.