The sons of ousted Egyptian President Hosni Mubarak have been freed from prison pending a retrial into their corruption case, state media has said.

Alaa and Gamal Mubarak were freed early on Friday after a court ordered their release after they served the maximum pretrial detention, the state-owned Al-Ahram newspaper said.

The brothers were sentenced to four years in jail after their father, Hosni, was unseated in a popular uprising in 2011.

Their charges included embezzling at least $16m earmarked for the maintenance of presidential palaces.

The retrial of the former leader and his two sons was ordered this month and their lawyer Farid al-Deeb said at the time that the elder Mubarak, who is in a military hospital, would also be a free man.

The release of the Mubaraks so close to the January 25 anniversary of the 2011 revolt risks antagonising government critics.

Hosni Mubarak was sentenced to life in prison for his involvement in the deaths of hundreds of protesters during the 18-day uprising.

Source: Agencies