Egypt's ousted president Hosni Mubarak has walked free for the first time in six years, his lawyer says.

Mubarak on Friday left a military hospital where he had spent much of his six-year detention over a series of charges, including killing protesters in the 2011 uprising that ended his 30 year rule in 2011.

His lawyer Farid al-Deeb was quoted as saying that the former Egyptian dictator was heading to his home in Heliopolis.

A top appeals court cleared Mubarak earlier this month of charges of killing protesters. He was accused of inciting the deaths of protesters during the 18-day revolt, in which about 850 people were killed.

The release came a day after an Egyptian court ordered a renewed corruption probe into Mubarak over allegations that he, his wife, two sons and their wives received gifts from the state-owned Al-Ahram newspaper valued at about $1 million.

In January 2016, the appeals court upheld a three-year prison sentence for Mubarak and his two sons on corruption charges. But the sentence took into account time served. Both of his sons, Alaa and Gamal, were freed.

Mubarak was originally sentenced to life in prison in 2012 for conspiring to murder 239 demonstrators during the 18-day revolt but an appeals court ordered a retrial that culminated in 2014 in the case against him and his senior officials being dropped.

The court also rejected demands by lawyers of the victims to reopen civil suits. That left no remaining option for appeal or retrial, according to a judicial source.

Lawyers of the victims have condemned the verdicts clearing Mubarak and his officials as politically motivated.

Many Egyptians who lived through Mubarak's rule view it as a period of autocracy and crony capitalism. His overthrow led to Egypt's first free election, which brought in President Mohamed Morsi.

Morsi only lasted a year in office and was overthrown by then army chief General Abdel Fattah el-Sisi, who went on to win a presidential election in 2014.

Sisi has since launched a crackdown on Morsi and his Muslim Brotherhood. By contrast, Mubarak-era figures have been cleared of charges and a series of laws limiting political freedoms has raised fears among activists that the old regime is back.