An Egyptian court sentenced deposed president Hosni Mubarak Wednesday to three years’ prison on corruption charges, in one of two trials following the 2011 uprising that ended his rule.

Mubarak’s two sons, one-time heir apparent Gamal and wealthy businessman Alaa, were also convicted of graft and sentenced to four years in prison each.

The Mubaraks were convicted of charges that they embezzled millions of Egyptian pounds worth of state funds in over a decade. The funds were meant for renovating and maintaining presidential palaces but were instead spent on upgrading the family’s private residences.

The three were also fined 21.1 million Egyptian pounds (NIS 10.3 million) and ordered to reimburse 125 million Egyptian pounds (NIS 61 million) to the state treasury.

Hosni Mubarak, 86, also faces charges over the killing of protesters during the 2011 uprising that unseated him from power after 30 years.

Wearing a gray suit, he sat on a wheelchair in the caged dock for the verdict. His sons, in white prison-issue clothing, stood beside him.

Mubarak had technically been a free man after a court ordered his release last year following the end of the permitted detention period, but has since remained out of sight in a military hospital.

He is now likely to be returned to prison.

The Mubaraks had returned around 120 million Egyptian pounds to the state in connection with this case, but the proceedings against them continued. Four other defendants in the case were acquitted.

They have all been held in custody since 2011 but only time in custody in connection with this case — about a year since the embezzlement charges were raised — will be deducted from the sentences.

Under Egyptian law, maximum sentences for embezzlement vary depending on the nature of the crime, but 15 years’ imprisonment is not uncommon.

Mubarak was found guilty in June 2012 of failing to stop the killing of more than 900 protesters during the 18-day revolt against his rule and sentenced to life imprisonment.

His conviction was overturned in January 2013. That was appealed by prosecutors, and a retrial began in April 2013. He was ordered released in August last year pending his graft trial, but was kept at a military hospital in a suburb south of Cairo. Given his poor health, Mubarak is likely to serve his sentence in the hospital.

Mubarak’s sons are also being retried on separate graft charges.