Egypt's ousted former President Hosni Mubarak has died at the age of 91, state television said on Tuesday, weeks after undergoing surgery.
The Egyptian presidency announced three days of mourning starting on Wednesday.
Bernie, Bibi and the brutal occupation: Listen to Gideon Levy
Prime Minister Benjamin Netanyahu said in a statement that he "would like to express deep sorrow" over the death of "President Mubarak, my personal friend."
Mubarak ruled Egypt for 30 years until he was ousted following mass protests against his rule in 2011. He was jailed for years after the uprising, but was freed in 2017 after being acquitted of most charges.
Egypt's presidency said in a statement that it mourned Mubarak's death as a "military leader and war hero" and has offered its condolences to his family.
Mubarak was originally sentenced to life in prison in 2012 for conspiring to murder 239 demonstrators during the 18-day revolt that sowed chaos and created a security vacuum but also inspired hope for democracy and social justice.
An appeals court ordered a retrial that culminated in 2014, when charges against Mubarak and his senior officials were dropped. An appeal by the public prosecution led to a final retrial by the Court of Cassation, the highest in the country, which acquitted Mubarak in 2017.
- A look back at former Egyptian President Hosni Mubarak's three decade rule
- Mubarak, Thatcher and Reagan secretly negotiated a solution to the Arab-Israeli conflict
Since his release from prison Mubarak has rarely been seen in public. In December 2018, the former president testified in the trial of his successor, Mohammed Morsi. When he arrived at the courthouse in Cairo, the 90-year-old Mubarak was accompanied by his sons, and walked with a cane.
Mubarak never expected to be president. But when a very public assassination thrust the former bomber pilot into the job, he made it his mission never to give it up.
An unremarked vice president to Anwar Sadat, he was a stopgap in the anxious days of 1981 after Sadat was gunned down beside him at a military parade. Few thought he would last.
Yet slowly, surviving attempts on his own life, he became "Pharaoh", presiding over decades of stagnation and oppression and offering his people a choice: Mubarak or mayhem.
Many believed him, not just in Egypt. U.S. administrations showered him - and the biggest army in the Middle East - with billions of dollars in gratitude for his loyalty to Sadat's Cold War switch of allegiance and peace with Israel.
Labor-Gesher leader Amir Peretz expressed sorrow over Mubarak's death. "[Former] President Mubarak, who rose to power after Sadat was murdered, will be remembered as a courageous leader who pushed for strengthening the peace treaty between Israel and Egypt. He helped advance agreements with the Palestinians and supported the normalization of Israel's relationship with moderate Arab countries."
Peretz added that Israel's peace treaty with Egypt had "its ups and downs, but Mubarak's rise to power preserved it. Some would say it was 'a cold peace,' but it's definitely preferable to war. Mubarak's critics as well as his successors understood that."
It was his struggles with the Islamists - who by killing Sadat handed power accidentally to a man who would spend 30 years suppressing them - which defined his politics.
Yet to the question of how Egyptians should be governed in the future, he never had an answer beyond "Mubarak" and always refused to indicate a successor. Washington expected him to go on rigging elections till he died, when his son Gamal might take over.
"Nobody imagines that we can press a button and freedoms will arrive. Otherwise it would lead the country to chaos and that would be a danger to people," Mubarak once said.
Mubarak was a 24-year-old air force pilot when the military overthrew King Farouk in 1952.
The son of a government clerk, he was born Muhammed Hosni El Sayed Mubarak in the Nile Delta village of Kafr Musailha on May 4, 1928, when Egypt was still heavily supervised by Britain, which controlled the Suez Canal.
Details of his early life are sketchy. He qualified as a pilot in 1950 and spent more than two years in the Soviet Union a decade later, training to fly bombers.
When much of the air force was wiped out by Israeli warplanes in the Six-Day War of 1967, he was made head of the air force academy, charged with rebuilding air power to hit back. As head of the air force from 1972, he did just that, attacking Israel in 1973.
Sadat, who succeeded Gamal Abdel Nasser in 1970, saw in Mubarak a loyal subordinate and made him vice president in 1975.
That office would lie vacant under Mubarak, who guarded his power jealously.
As president, Mubarak sent the army in to quell mutineers in the 1980s, and also repaired relations with Arab states after Sadat's peace with Israel. In 1989, Egypt was readmitted to the Arab League, which moved its headquarters back to Cairo.
American money made sure that Egypt never wavered from an arms-length civility toward the Jewish state, and Mubarak played mediator between Israel and the Palestinians down the years.
His policies irritated many in the Middle East. After Hamas Islamists took control in the Gaza Strip, adjacent to Egypt, in 2007, Mubarak backed the Israeli blockade of the territory.
Violence by Islamists at home, including attacks on tourist sites and Red Sea resorts, remained a justification for the police state. In 1995, Mubarak survived one of several assassination attempts when Islamist gunmen fired on his car during a visit to Ethiopia.
A command economy fashioned under the Arab socialist Nasser lagged behind countries Egypt was once compared to, such as Turkey or South Korea. Egypt's population almost doubled under Mubarak, but many remained mired in deep poverty.
A spurt of growth in his final decade, fuelled by market reforms overseen by his son Gamal, made some rich, but corruption ensured the wealth stuck to the elite around the head of state, the military and those who found favour in the National Democratic Party (NDP).
Politically, there was talk of reform, not least when former U.S. President George W. Bush was pushing the idea. After winning a series of single-candidate referendums that provided the legal basis of his rule, Mubarak agreed to contest a presidential election in 2005. But the defeat of Ayman Nour, a liberal lawyer who dared challenge him, was no surprise.
By 2010, the NDP felt confident enough of its impunity to claim 90% of the seats in a parliamentary election that saw the Muslim Brotherhood eliminated from the legislature.
The resulting public outrage might have subsided, as it had before, had it not been for the sudden success of an uprising in Tunisia just a few weeks later which also prompted protests against Egypt's ruler.
At first, Mubarak gave little ground to the hundreds of thousands of demonstrators in Cairo's Tahrir Square, comforted by hesitation in Western capitals to cut loose an ally.
Only when his generals began to desert him, fearful their own privileges might be swept away, and the Americans sided with the popular will, did he relent, at first insisting he would retire only later but finally flown off to his Red Sea retreat.
"Egypt and I shall not be parted until I am buried in her soil," he said. He was arrested two months later.