An Egyptian court on Tuesday ordered a retrial in a $17 million embezzlement case against the country’s deposed President Hosni Mubarak, dropping the only remaining charge against him, according to media reports. The court also overturned the convictions of his two sons, Gamal and Alaa, reportedly noting that legal procedures had not been followed properly.

In May last year, Mubarak had been sentenced to three years in prison for stealing public funds allocated for the renovation of the presidential palace, according to media reports.  His two sons were given a sentence of four years each in the same case. Later, in November, Mubarak was cleared of charges related to ordering the killing of protesters during the country’s 2011 uprising and a corruption case related to a gas export deal with Israel.

Following the order by the Court of Cassation, Egypt’s top appeals court, on Tuesday, Mubarak’s lawyer told BBC that he would soon be released from the Maadi military hospital in the Egyptian capital city of Cairo, where he is currently being detained. However, the court did not say whether Mubarak would be freed on bail pending his retrial.

Mubarak’s ouster in 2011, following a popular uprising after a rule of 30 years, had led to the country’s first free elections. However, his successor, Mohammed Morsi, who belonged to the Muslim Brotherhood, was driven out of office by President Abdel-Fattah el-Sissi, the then army chief, in July 2013, following protests against his government.

Since el-Sissi came to power, supporters of the Muslim Brotherhood, which has since been declared a terrorist organization, have been targeted for prosecution by Egyptian courts, inviting harsh criticism about the absence of due process from human rights organizations.