CAIRO - An Egyptian court Monday ordered the release of ousted president Hosni Mubarak’s two sons who were sentenced to three years in jail for corruption, a judicial official and their lawyer said.

The court ordered Alaa and Gamal Mubarak to be released after having taken into account time served since their arrest in 2011, the judicial official and defence lawyer Farid al-Deeb said. “Yes, the court has ordered their release,” Deeb told AFP. He insisted that both men have served their time in prison and should be allowed to go free. A security official said the brothers could be freed as early as “today (Monday) or tomorrow”, depending on how quickly their release is processed.

Mubarak and his two sons were all arrested in 2011, months after the former strongman was toppled in a popular 18-day uprising after three decades in power.

In May, a court sentenced the trio to three years in prison each for having embezzled 125 million Egyptian pounds ($16 million) from funds meant for the maintenance of presidential palaces.

They were fined that same amount plus an extra 21 million pounds. In January, Alaa and Gamal were released briefly after their pre-trial detention period expired, but they were arrested in May after the verdict was pronounced. Their release is likely to present a dilemma for President Abdel Fattah al-Sisi, a former army chief whom opponents accuse of reviving Mubarak-era autocratic practices. Sisi took power after ousting the country’s first post-revolution leader in 2013 - Islamist president Mohamed Morsi - and won a landslide victory in last year’s presidential election.

Sisi, who has unleashed a deadly crackdown on Morsi supporters, has faced accusations of being even more authoritarian than Mubarak.

Mubarak, who turned 87 in May, is being held in a military hospital in Cairo and faces a retrial for alleged complicity in the murder during the 2011 uprising of hundreds of protesters demanding his ouster.

His sons still face a separate trial for alleged stock market manipulation.

Following Mubarak’s ouster, many former regime figures were arrested and tried, including on charges of corruption, but most have been acquitted.

Hundreds of Morsi supporters have meanwhile been sentenced to death in mass and speedy trials that have triggered international condemnation.