Ousted Egyptian President Hosni Mubarak died at the age of 91 on Tuesday, weeks after undergoing surgery in a hospital in Cairo, The Guardian reported.

Mubarak died of unspecified health complications, according to Egypt’s state TV. One of his sons, Alaa, announced over the weekend that the former president was in an intensive care after the surgery.

Mubarak ruled Egypt for 30 years until he was forced by the military to resign after 18-day nationwide protests that were part of the 2011 Arab Spring uprising. He was the first leader to face trial after the uprising in the region.

He was convicted along with his former security chief in June 2012 and sentenced to life in prison for failing to prevent the killing of some 900 protesters who rose up against his autocratic regime in 2011. Both appealed the verdict and a higher court later cleared them in 2014.

He was jailed for years after the uprising, but was freed in 2017 after being acquitted of most charges. The acquittal had shocked many Egyptians, thousands of whom poured into central Cairo to show their anger against the court. A separate corruption charge was overturned in January 2015.

Following his release, he was taken to an apartment in Cairo’s Heliopolis district.

He rose to power after Anwar Sadat’s assassination in 1981.