CAIRO - An Egyptian court Saturday sentenced ousted president Hosni Mubarak to three years in prison on corruption accusations, after he was cleared of murder charges in another case.

“The ruling of the court is three years in prison without parole for Mohamed Hosni Mubarak and Gamal Mohamed Hosni Mubarak and Alaa Mohamed Hosni Mubarak,” Judge Hassan Hassanein announced on Saturday.

Mubarak’s treatment by the courts since being toppled from the presidency during the 2011 Arab Spring uprisings has been perceived by his opponents as too lenient and raised doubts about Egypt’s transition towards democracy.

Mubarak and his sons Alaa and Gamal, also sentenced to three years, were present in the caged dock, wearing suits and sunglasses. Their lawyers may try to appeal. It was not immediately clear whether the sentencing took into account time served.

The three had all been arrested in 2011, months after Mubarak was toppled in a popular 18-day uprising after three decades in power.

State news agency MENA later reported that prison authorities contacted the prosecution to inquire about how much time the three had already spent in jail.

They had initially been sentenced to three years on the same charges but an appeal court overturned the original verdict.

Mubarak, who waved at his supporters in the benches before the judge read his verdict, was taken to the military hospital where he has spent much of his time since his detention in 2011.

He and his sons were fined 125 million pounds - the amount they were accused of embezzling from funds meant for the maintenance of presidential palaces. The court also ordered them to pay an extra 21 million pounds.

Before Saturday’s verdict, Mubarak and his sons had been free men after their pretrial detention period expired.

Mubarak, who turned 87 this month, was cleared of charges in another trial over the deaths of protesters during the January-February 2011 uprising. Seven of his police commanders were also acquitted in that trial. The prosecution has lodged an appeal.

In the months following his ouster, Egypt’s interim military rulers rounded up top Mubarak-era leaders and police commanders and put them on trial, under pressure from protesters.

Most have since been acquitted, as widespread anger shifted to Mubarak’s now overthrown successor, the Mohamed Morsi. Morsi, a Muslim Brotherhood leader, was overthrown by the army in 2013 and his movement crushed in a crackdown that has left hundreds dead.

He has been sentenced to 20 years in prison over deadly clashes outside his palace during his year in power.

Mubarak was overthrown in one of the regional uprisings that swept the Middle East in 2011 after Tunisian protesters forced their president out.

The revolutionary optimism that marked the uprising has given way to fatigue and even nostalgia among many for the stability under Mubarak’s regime. His former military intelligence chief, Abdel Fattah al-Sisi, is now president.

Sisi overthrew Morsi, who had promoted him to defence minister in a move to purge Mubarak loyalists in the army, after millions protested to demand Morsi’s resignation.

Since then Sisi has crushed the Muslim Brotherhood, once the country’s largest political movement, while restoring the police’s authority after it had all but collapsed in 2011. Critics say the popular leader is reviving the practices of the Mubarak era, which was marred by police abuses and arrests of dissidents. Sisi has distanced himself from Mubarak, but says the country has little room for chaotic protests as it tries to recover its economy.