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

Mr Mubarak ruled Egypt for 30 years until he was ousted following mass protests against his rule in 2011 during the Arab Spring.

He was jailed after the uprising, but was freed in 2017 after being acquitted of most charges.

Most of his sentence had been spent in military hospital.

Mr Mubarak had been vice president before he succeeded president Anwar Sadat following the leader's assassination in 1981.

Mr Mubarak appeared in court in 2011 in a hospital bed 

Born in 1928, Mr Mubarak joined the Egyptian air force after school and qualified as a pilot in 1950.

He became head of the air force in 1972 and then in 1975 was made vice president by Mr Sadat, before becoming president in 1981.

Having served as president for 30 years, Mr Mubarak was jailed for life in 2011 for conspiring to murder protesters.

In 2017, following an appeal by the prosecution, Egypt's top appeals court acquitted him.

Mr Mubarak returned to his home in an upscale Cairo neighbourhood, near the presidential palace he had occupied for nearly three decades.