Egypt's former strongman Hosni Mubarak, who was toppled by a popular revolt in 2011, has died at the age of 91, the country's state TV said on Tuesday.
Mubarak has been in an intensive care for over a month after undergoing surgery, according to his son Alaa. He was largely confined to his home in the last few years before his death.
In his last public appearance in October 2018, Mubarak appeared as imperturbable as ever.
In a YouTube video he released to commemorate the 45th anniversary of the war with Israel in which he was an air force commander, Mubarak spoke in a typically composed manner, one of that of an incumbent rather than a leader who was toppled by a popular uprising seven years earlier.
Mubarak never had a sense of guilt, saying over and over again that he did his best for the country. In a famous speech that was meant to be emotional a few days before his fall from grace, Mubarak said he would let history judge his legacy.
After he was dethroned, the aging man survived several charges leveled against him, including killing more than 800 protesters, even though his security forces used lethal force in attempts to end any challenges to his rule.
However, he was still convicted in a corruption-related case, for which he served three years in prison.
In the first decade of his rule, Mubarak was credited with steadying the ship after inheriting a heavily indebted country. He boasted of helping wipe out tens of billions of dollars in debts as a reward from the United States for Egypt's decision to enter a US-led military alliance to force Iraq out of Kuwait in the Gulf War of 1991.
"After three-month talks with the US and president (George H. W.) Bush, we finally made that deal even before the war began," Mubarak said in a 2005 interview with the national Egyptian television.
"At the time, we were struggling to even pay the debt interests. We would have never been able to move forward if that burden had persisted."
Mubarak helped crush an Islamist militant insurgency that flourished in the 1990s, with one infamous attack claiming the lives of more than 60 people -- mostly tourists -- in the southern province of Luxor in 1997. He also survived an assassination attempt in Addis Ababa, Ethipoia, two years earlier after gunmen had opened fire on a motorcade carrying him to an African summit in the Ethiopian capital.
While Mubarak's security bodies eventually managed to tame the insurgency, heavy-handed tactics were also used against political and apolitical prisoners alike as a downward slide began in the early 2000s.
Corruption, cronyism and the ascent of powerful businessmen linked to the upper echelons of the regime started to bite, with private media, which had just started to blossom, growing more vocal.
Disparagement of the prime minister and ministers was rampant, although any criticism of Mubarak and his family was still considered off-limits.
Videos of prisoners being tortured flooded the internet and Mubarak's apparent attempts for reforms did little to appease public anger, including introducing constitutional amendments in 2005 that allowed for the first time multi-candidate presidential elections to take place.
In the same manner of his landslide victories in the now-disbanded referendums on the presidency, Mubarak romped to another win in the first multi-candidate elections in 2005, facing mild competition from opposition figure Ayman Nour, who was later imprisoned on what he believed were trumped-up charges of forging election endorsements.
The relative honeymoon Mubarak had enjoyed for decades was quickly over and an uptick of events in the following years was seen as the writing on the wall.
The sinking of a ferry in the Red Sea that killed more than 1,000 people in 2006, rare and large-scale protests that erupted against Mubarak two years later in the industrial Nile Delta city of Mahalla and notorious parliamentary elections that were rigged in favor of Mubarak's ruling party in late 2010 fueled public anger.
Widespread belief that Mubarak was grooming the younger of his two sons, Gamal, to succeed him did him no favors and the beating of a youngster to death by police forces in the Mediterranean city of Alexandria proved the last straw.
A Facebook page, co-run by then Google executive Wael Ghonim, mobilized protests in January 2011, inspired in part by the uprising in fellow North African country Tunisia that forced president Zine El Abidine Ben Ali to flee.
Mubarak did offer some concessions as millions converged on public squares, including reshuffling his cabinet, but it was too little, too late.