Egypt's former President Hosni Mubarak has died at the age of 91, state television said on Tuesday, weeks after undergoing surgery.

Mubarak ruled Egypt for nearly 30 years until he stepped down amid mass protests against his rule in 2011, although he and his family stayed in the country.

He was sentenced to life in prison for conspiring to murder 239 demonstrators during the 18-day revolt but was freed in 2017 after being cleared of the charges.

He was, however, convicted in 2015, along with his two sons, of diverting public funds and using the money to upgrade family properties. They were sentenced to three years in jail.