An Egyptian court on Wednesday sentenced ousted president Hosni Mubarak to three years in prison on charges of stealing public funds.

"The court orders Mohamed Hosni Mubarak to be sent to jail for three years," said judge Osama Shaheen as Mubarak looked on from a cage flanked by his sons, who were sentenced to four years in jail on the same charges.

The court fined Mubarak and his sons about $3,246,000 Cdn and ordered them to repay about 19 million dollars of funds the court said they had stolen.

Mubarak's former intelligence chief, Abdel Fattah al-Sisi, is poised to be elected president next week.

The verdict may please some Egyptians who lived through three decades of autocracy under Mubarak, but analysts say that businessmen still loyal to him are still influential. Rights groups say that abusive practices of the Mubarak regime are alive and well as another former military man prepares to take the reins of power.

Mubarak has been under house arrest at a military hospital since August pending retrial in a case of complicity in killing protesters during the 2011 uprising that ended his rule.

It was not immediately clear if the three years Mubarak and his sons have already spent in jail would be counted toward the sentence and if Mubarak would return to the army hospital or be sent to prison.