An Egyptian court has 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.

They were sentenced to four years in jail on the same charges.

The court fined Mubarak and his sons 21.197m Egyptian pounds (€2.17m).

It ordered them to repay about 125m Egyptian pounds (€12.8m) 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 former president 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 is not yet clear if the three years Mubarak and his sons have already spent in jail would be counted towards the sentence and if Mubarak would return to the army hospital or be sent to prison.