Updated

Hosni Mubarak, Egypt's former autocrat who ruled for nearly 30 years before being ensnared in the 2011 Arab Spring that swept through the region, died Tuesday at 91, Egypt state TV reported.

The former leader passed away at a Cairo hospital where he had undergone surgery. State TV did not elaborate on the procedure, but it came days after one of his sons, Alaa, announced that Mubarak was in intensive care after undergoing a different surgery on January 23.

Mubarak was a career military pilot who led the country's air force during Egypt's last war against Israel in 1973. He was made vice president in the mid-1970s and assumed the highest office in 1981 after his mentor, President Anwar Sadat, was assassinated by Islamic extremists while he was in the reviewing stand of a military parade.

Former Egyptian President Hosni Mubarak, seated center left, and his two sons, Gamal Mubarak, left, and Alaa Mubarak attend a hearing in a courtroom in Cairo, Egypt, in 2013. (AP)

Former Egyptian President Hosni Mubarak, seated center left, and his two sons, Gamal Mubarak, left, and Alaa Mubarak attend a hearing in a courtroom in Cairo, Egypt, in 2013. (AP)

FLASHBACK: MUBARAK STEPS DOWN FROM POWER

Seated next to Sadat, Mubarak escaped with a minor hand injury as gunmen sprayed the reviewing stand with bullets. Eight days later, Mubarak was sworn in as president, promising continuity and order.

Throughout his rule, Mubarak was a stalwart U.S. ally and a bulwark against Islamic militancy. 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.

Nearly 900 protesters were killed during that stretch, which ended when Mubarak stepped down and handed over his power to the military.

Mubarak eventually was sentenced to life imprisonment for involvement in the killing of anti-government protesters during the uprising, but later was retried and subsequently acquitted and released in 2017.

In this 1981 file photo, Egyptian President Anwar Sadat, right, and Vice President Hosni Mubarak sit on the reviewing stand during a military parade just before soldiers opened fire from a truck during the parade at the reviewing stand, killing Sadat and injuring Mubarak.

In this 1981 file photo, Egyptian President Anwar Sadat, right, and Vice President Hosni Mubarak sit on the reviewing stand during a military parade just before soldiers opened fire from a truck during the parade at the reviewing stand, killing Sadat and injuring Mubarak. (AP)

For the man who was long untouchable — even a word of criticism against him in the media was forbidden for much of his rule — his time in prison was a shock. When Mubarak was flown from the court to Torah Prison in Cairo in 2011, he cried in protest and refused to get out of the helicopter.

DOZENS OF ANCIENT EGYPTIAN GRAVES FOUND WITH RARE CLAY COFFINS

Since his arrest in April 2011, Mubarak spent nearly six years in jail in hospitals. Following his release, he was taken to an apartment in Cairo’s Heliopolis district.

Over the years, Mubarak tinkered with reform but shunned major change. The U.S. tried pushing him harder for reforms, but fearful of losing its alliance with the most powerful Arab country, Washington backed off.

Yet the failure to fulfill repeated promises of change steadily deepened public despair and those seeking a democratic future were dismayed to see Mubarak making apparent moves to set up a dynastic succession in the shape of his businessman son, Gamal Mubarak.

Following Mubarak's death Tuesday, current Egyptian President Abdel-Fattah el-Sissi offered condolences and announced three days of national mourning beginning Wednesday.

"The Presidency mourns with great sorrow the former President of the Republic, Mr. Mohammed Hosni Mubarak," he said in a statement. It referred to Mubarak as "one of the leaders and heroes of the glorious October war, as he assumed command of the Air Force during the war that restored dignity and pride to the Arab nation."

Israeli Prime Minister Benjamin Netanyahu expressed "deep sorrow" over Mubarak's death.

"President Mubarak, a personal friend of mine, was a leader who guided his people to peace and security, to peace with Israel," Netanyahu said.

CLICK HERE TO GET THE FOX NEWS APP

Palestinian President Mahmoud Abbas said Mubarak "spent his life serving his homeland and the issues of righteousness and justice in the world, with the issue of our Palestinian people at the top of them."

The United Arab Emirates also mourned the former president and extended condolences to el-Sissi and Mubarak's family, the official WAM news agency reported. It said UAE flags would be lowered for one day of mourning.

The Associated Press contributed to this report.