A Cairo court has sentenced Egypt's deposed president Hosni Mubarak and his two sons to three years in prison on corruption charges today.

Authorities may deem the punishment as having already been served but if it withstands appeal it would officially establish Mubarak as a convicted criminal years after the 2011 popular uprising that toppled him.

The case - dubbed the "presidential palaces" affair by the Egyptian media - was a retrial alleging that Mubarak and his sons embezzled millions of dollars' worth of state funds over the course of a decade, diverting money meant to pay for renovating and maintaining presidential palaces to instead upgrade their private residences.

Mubarak had originally been sentenced to three years over the matter, and his sons to four, but they later appealed, sparking the retrial.

As Egypt's political tides shifted in the wake of his overthrow, he had been convicted of bearing responsibility for the deaths of protesters but was later acquitted, although that ruling now faces an appeal by prosecutors.

Inside the courtroom at a sprawling, locked-down police academy on the outskirts of Cairo, a dozen Mubarak supporters shouted in anger as Judge Hassan Hassanin announced his verdict, standing up on benches and pumping their fists into the air. The three defendants stood in a courtroom cage soundproofed with a glass enclosure.

"We believe in you! We trust Mubarak!" supporters yelled, as some women began crying. Others wearing T-shirts emblazoned with the former leader's face waved and blew kisses when the 87-year-old entered the courtroom. A seated, suited Mubarak, wearing sunglasses and flanked by sons Gamal and Alaa, gave no visible reaction to the verdict, which their lawyers say can be appealed.

The sentencing included a 125 million Egyptian pound (£10.6 million) fine to be paid among the three men, as well as the return of 21 million Egyptian pounds (£1.8 million) they embezzled. After the hearing, judicial and security officials said those amounts had already been paid by the Mubaraks following their first trial.

Mubarak returned to the military hospital in Cairo where he has been held during his trials. Officials said his two sons were taken to Torah Prison as authorities determine whether their time served in detention would cover today's sentences.

Many Egyptians view Gamal, Mubarak's one-time heir apparent, and his brother Alaa, a wealthy businessman, as key symbols of an autocratic and corrupt administration which struck an alliance with the mega-wealthy at the expense of the poor. Although father and son repeatedly denied any plans to have Gamal ascend to the presidency, that perception, along with endemic corruption, police brutality and poverty, fuelled the 2011 revolt.

Images of Gamal making public appearances have circulated on social media, first at a funeral last month and then last weekend with his family at the Giza pyramids. Amid the turmoil that followed the revolution, nostalgia over the relative stability of the Mubarak-era has been growing in Egypt.

The rise of Egyptian President Abdel-Fattah el-Sissi, who has vowed stability after four years of unrest and taken a tough line against dissent, has encouraged Mubarak supporters and upended the public perception and media depiction of the 2011 uprising. Political activists of all stripes are now most often cast as troublemakers or foreign agents, and hundreds of the young activists who sparked the 2011 revolt are now either languishing in prison on charges of breaking a harsh new protest law or have left the country.

Islamist president Mohammed Morsi, Mubarak's elected successor, was himself overthrown by the military, led by el-Sissi, in 2013 after mass protests against his divisive rule. Today's hearing, a session of the Cairo Criminal Court held at the academy, took place in the same courtroom where Morsi was sentenced to 20 years in prison last month for using force against protesters.

Prosecutors last week filed an appeal against Mubarak's acquittal in the case involving the killing of protesters. An appeals court will decide on June 4 on whether to order a retrial.

After today's session, Mubarak supporter Mohamed Saadawi, whose group organises demonstrations praising him under the banner "We are sorry, Mr President", denounced the verdict and accused el-Sissi of interference with the judiciary.

"It's politics and it's very sad. I keep telling Egyptians that el-Sissi hates Mubarak," he said outside the courthouse. "Mubarak for me is a hero."

ends