CAIRO — In his final years, Hosni Mubarak basked in the affection of his family and his supporters.
The former autocrat, who ruled Egypt for three decades, was photographed at a Mediterranean beach resort with a smiling granddaughter on his knee. His sons, once viewed as pariahs by many Egyptians, appeared at nightclubs and soccer matches.
Last month, as Mr. Mubarak neared death, his grandson Omar posted a photograph to Instagram that showed him kissing the forehead of his grandfather. “All love and appreciation,” it read, with a heart emoji.
Mr. Mubarak’s comforting end was a sharp contrast with the final days of his successor as president of Egypt, Mohammed Morsi. Although democratically elected in 2012, Mr. Morsi was ousted a year later, cast into a maximum-security prison where he was denied essential medicines and regular family visits. He died last June after collapsing inside a cage in a courtroom.
The clashing fates of the two men underscore the complex task facing Egyptians as they weigh the legacy of Mr. Mubarak, who divides them in death as in life. Mr. Mubarak, who died on Tuesday at 91, will be buried with full military honors at a state funeral in Cairo on Wednesday.
The soaring hopes for democracy and reform that were stirred by Mr. Mubarak’s ouster during the Arab Spring in 2011 have been so completely crushed under its current ruler, President Abdel Fattah el-Sisi, that some Egyptians find themselves pining for the rule of the man they once despised.
“He was a crook,” one Egyptian said on Twitter after the government confirmed Mr. Mubarak’s death. “But he was a real man, and he never humiliated Egypt, unlike the dark days we are living now.”
That grudging respect for Mr. Mubarak makes commemorating his death a potentially delicate matter for Mr. el-Sisi, who announced three days of national mourning on Tuesday.
Early signals indicated that the government wanted to celebrate Mr. Mubarak as a war hero, principally for his role in leading Egypt’s air force against Israel in 1973. But it also wants to avoid any large-scale displays of public sympathy.
That ambivalence was evident in the hours after Mr. Mubarak’s death, when state television broadcast a sharply critical obituary, which referred to the last 10 years of Mr. Mubarak’s rule as “the decade of lost opportunities,” before switching to a promotion for an entertainment talk show.
At the same time, Mr. el-Sisi issued a statement expressing “great sadness and deep sorrow” at the death of Mr. Mubarak. “He was one of the October War commanders and heroes as he served as commander of the Egyptian Air Force during the war, which restored the dignity and pride of the Arab nation,” it said.
Reactions among other Egyptians varied greatly. Some were indignant that he was allowed to retire peacefully. “He should have been in a jail cell,” said Mohamed El Dahshan, an economist, on Twitter. “Or in The Hague. Instead, he benefited from the broken justice system he left us.”
Others gave a weary shrug.
“After nine years we no longer care,” said Taker Soliman, whose brother was one of about 800 people killed by Egyptian security forces in the uprising against Mr. Mubarak in 2011. “The revolution achieved nothing. Its demands are upside down, and 90 percent of Egyptians have forgotten about it. They can give Mubarak whatever kind of funeral they want.”
A court sentenced Mr. Mubarak to life imprisonment in 2012 for his role in the deaths of protesters during the Arab Spring, but he was acquitted at a retrial. Corruption cases against other senior figures from his administration, as well as his sons, Alaa and Gamal, also collapsed.
His retirement started in earnest in 2017 when he was released from detention at a military hospital in Cairo, and returned to his villa in the upscale Cairo neighborhood of Heliopolis. By then, many of the young protesters who had helped oust Mr. Mubarak in 2011 had been imprisoned or forced into exile by Mr. el-Sisi.
Last fall, Mr. Mubarak spoke in a video posted on YouTube about the 1973 war, his first interview on camera since his ouster. Last May, he spoke with a Kuwaiti journalist about his foreign policy while president, including his efforts to prevent the Iraqi invasion of Kuwait in 1991.
What really caught the attention of Egyptians, though, was a photo of the interview that showed Mr. Mubarak in a suit, sitting in a lavishly decorated room, holding forth as he had for so many years in power. The photograph, posted to Twitter, was signed with Mr. Mubarak’s autograph.
His death was mourned by the leaders of Israel and Palestine, whose conflict was a major preoccupation during his decades in power.
Prime Minister Benjamin Netanyahu of Israel remembered him as “a personal friend,” while the Palestinian leader, President Mahmoud Abbas, said Mr. 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.”
For Mr. el-Sisi, Mr. Mubarak represents a complex figure — the leader whom Egyptians ousted in a popular uprising, yet, like him, a military-backed authoritarian.
Ultimately, Mr. Mubarak’s legacy may be Mr. el-Sisi’s iron-fisted rule, said Andrew Miller of the Project On Middle East Democracy.
“Mubarak is gone, but 100 million Egyptians still live in his Egypt,” Mr. Miller said. “Sisi is worse than Mubarak in many ways, but without Mubarak there is no Sisi. That is Mubarak’s legacy.”
Mr. Mubarak’s good fortune was most starkly highlighted in December 2018 when he and his sons gave evidence against Mr. Morsi in court. Mr. Mubarak and his sons arrived at the hearing in suits, while Mr. Morsi, who was elected president during Egypt’s only free presidential election in 2013, wore prison garb.
After Mr. Morsi died last year, television news anchors read a 42-word obituary that had been circulated by Mr. el-Sisi’s intelligence services. It failed to describe him as a former president.
Those from inside Egypt’s powerful military who tried to oppose Mr. el-Sisi also met with harsh treatment. Ahmed Shafiq, a former prime minister and retired officer, and Sami Anan, a former army chief, were both silenced when they tried to stand against Mr. el-Sisi in the last presidential election in 2018.
“This is a clear message: Our men don’t get humiliated as long as they are within the fold,” said Emad Shahin, a political scientist at the American University in Cairo who currently lives in exile.
Among Mr. Mubarak’s supporters, his death was a deeply emotional milestone. Assem Abol Khair of Sons of Mubarak, a group that supported Mr. Mubarak during his trials, said he broke down in tears when he learned of it. “I can’t believe it,” he said.
Beyond the hard-liners, though, the nostalgia was shared by many ordinary Egyptians — a product of the deep divisions within Egyptian society since the 2011 uprising, which have pitted those who desire systemic change against those who fear it, said Mona El-Ghobashy, a scholar on Egyptian politics at New York University.
“They are fundamentally divided, much as Americans were after the Civil War,” she said.
Gamal Eid, a leading human rights activist, said that if Mr. Mubarak had faced true justice for his misdeeds, it would have set a powerful example in the Arab world.
“The tyrants of the world have lost one,” he said. “His legacy is a curse: entrenched corruption, bad laws and loyalists who are influential until now and known as the deep state.”
Above all, he added, “I am sad that he died without being held accountable.”
Farah Saafan contributed reporting from Cairo.