Hosni Mubarak, Egypt's president for almost 30 years who stepped down after a popular revolution in 2011, has died. He was 91.
Mubarak served as Egypt's fourth president starting in 1981 until his ouster in what became known as the Arab Spring revolution.
He was jailed for years after the uprising, but was freed in 2017 after being acquitted of most charges. The acquittal stunned many Egyptians, thousands of whom poured into central Cairo to show their anger against the court.
The Arab Spring protests convulsed autocratic regimes across the Middle East.
State television said Mubarak died at a Cairo hospital where he had undergone an unspecified surgery. The report said he had health complications but offered no other details. One of his sons, Alaa, announced over the weekend the former president was in an intensive care after undergoing surgery.
His brother-in-law, General Mounir Thabet, told AFP news agency he passed away at Cairo's Galaa military hospital.
Throughout his rule, Mubarak was a stalwart US ally, a bullwark against armed groups, and guardian of Egypt's peace with Israel.
But to the tens of thousands of young Egyptians who rallied for 18 days of unprecedented street protests in Cairo's central Tahrir Square and elsewhere in 2011, Mubarak was a relic, a latter-day pharaoh.
Al Jazeera's Jamal al-Shayyal, reporting from Tunis, Tunisia, where the Arab Spring originated, said it was unclear what exactly killed the former leader.
"What we're looking at now is a statesman who was so controversial in the past three, four decades of Egypt's history. It was under his rule that Egypt became more corrupt. It was under his rule that the infrastructure in the country reached a demise," he said.
"For sure his passing is something that will remind people of the situation in Egypt as well as the political legacy that he left behind, which is one that has allowed for the current military regime to continue in its ruling."
Mubarak was born in a rural village in the Nile Delta in 1928. He left behind a complicated legacy as his rule was partly characterised by corruption, police brutality, political repression, and entrenched economic problems.
The former president had long maintained his innocence and said history would judge him a patriot who served his country selflessly.
He joined the Egyptian air force in 1949, graduating as a pilot the following year. He rose through the ranks to become the commander-in-chief of the Egyptian air force in 1972.
Mubarak became a national hero the following year with reports that the Egyptian air force dealt a substantial blow to Israeli forces in Sinai during the Yom Kippur War.
His harsh stance on security enabled him to maintain the peace treaty with Israel.
Under his rule, Egypt remained a key United States ally in the region - receiving $1.3bn a year in US military aid by 2011.
Mubarak had been sentenced to life in prison in 2012 for conspiring to murder 239 demonstrators during the 18-day revolt.
An appeals court ordered a retrial and the case against Mubarak and his senior officials was dropped. He was finally acquitted in 2017.
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.
Since his arrest in April 2011, Mubarak spent the nearly six years in jail in hospitals. Following his release, he was taken to an apartment in Cairo's Heliopolis district.
Many Egyptians who lived through Mubarak's time in power 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 lasted only a year in office after mass protests in 2013 led to his overthrow by then defence chief General Abdel Fattah el-Sisi, who is now president.
Mubarak-era figures, meanwhile, are gradually being cleared of charges, and laws limiting political freedoms have raised fears among activists that the old regime is back.
Mubarak is survived by his wife, Suzanne, and his sons, Gamal and Alaa.