Celebrations erupted across the Middle East after Mubarak stepped down as Egypt’s president. From Beirut to Gaza, people rushed into the streets, handing out candy, setting off fireworks and shooting in the air.

Even in Israel, which had watched the Egyptian protesters’ uprising against Mubarak with concern, a former Cabinet minister said Mubarak did the right thing. “The street won. There was nothing that could be done. It’s good that he did what he did,” former Defense Minister Binyamin Ben-Eliezer, who knew Mubarak well, told Israel TV’s Channel 10.

Turkey's foreign minister congratulated the Egyptian people on Friday after the toppling of Mubarak and said he hoped a new system would emerge in the wake of the veteran president's departure.

“Congratulations to the Egyptian people. And we hope that a system meeting the expectations of the Egyptian people will emerge,” Ahmet Davutoglu said in a message on his Twitter page.

Egypt was the first Arab country to sign a peace treaty with Israel, and there are fears the 1979 accord could now be challenged.

Moments after Egypt’s Vice President Omar Suleiman made the announcement of Mubarak’s resignation, fireworks lit up the sky over Beirut. Celebratory gunfire rang out in the Shiite-dominated areas in south Lebanon and in southern Beirut.

In Tunisia, where a successful uprising expelled a longtime leader only weeks earlier, cries of joy and the thundering honking of horns greeted the announcement. “God delivered our Egyptian brothers from this dictator,” said Yacoub Youssef, one of those celebrating in the capital of Tunis.

Tunisia inspired pro-democracy protest movements across the Arab world after a month of deadly demonstrations pushed dictator Zine El-Abidine Ben Ali into exile in Saudi Arabia on Jan. 14.

In the Gaza Strip, ruled by the Hamas movement, thousands rushed into the streets in jubilation. Gunmen fired in the air and women handed out candy. “God bless Egypt, it’s a day of joy and God willing all corrupt leaders in the world will fall,” said Radwa Abu Ali, 55, one of the women distributing sweets.

“This is a victory for the will of the people and a turning point in the future of the region,” said Fawzi Barhoum, a Hamas spokesman.

Qatar on Friday described the transition of power to the military in Egypt as "positive and important," in reaction to the resignation of Egypt's embattled president Hosni Mubarak.

Iran said Egypt's people achieved a "great victory," on the same date as its  1979 revolution.

"The conquest by the will of the great Egyptian nation over the resistance and persistence of officials who were dependent on the world powers is a great victory," Foreign Ministry spokesman Ramin Mehmanparast said.

"We hope that by continuing on this path, all the historical demands of Egyptians will materialize," Mehmanparast told Iran's Arabic-language Al-Alam television.

Iran itself on Friday marked the 32nd anniversary of the revolution which toppled the US-backed shah Mohammed Reza Pahlavi.

In South Africa, officials applauded the resignation — and noted that it happened exactly 21 years after Nelson Mandela’s historic release from prison.

“Of course one wants to be cautious about linking events, but one can’t escape the symbolic importance of this day and the release of Mandela and how that ushered in a new process for South Africa,” said Ayanda Ntsaluba, the director general of South Africa’s Foreign Affairs Department. “Let’s hope this happy coincidence will also one day make the Egyptian people look back and say this indeed was the beginning of better times in Egypt.” The sentiment was shared across Europe, whose leaders had increasingly pushed Mubarak to make a dramatic move to open up Egyptian society.

EU foreign policy chief Catherine Ashton praised the resilience of Egypt’s protesters and said that, by standing down, Mubarak “has listened to the voices of the Egyptian people and has opened the way to faster and deeper reforms.”

Edward McMillan-Scott, the European Parliament’s vice president for democracy and human rights, expressed hope that Egypt could assume a more benign role in the region — and expressed regret at the Western support that had enabled Mubarak to cling to power for so long.

“Mubarak’s tyranny was typical across the region and it is Europe’s shame that we sustained them,” he said.

Messages of support for the Egyptian people flooded social networking sites Facebook and Twitter. The words “Congrats Egypt” were among the micro-blogging sites’ most popular term.

In Washington, President Barack Obama learned of Mubarak’s resignation during an Oval Office meeting — but has yet to make any public comment.

Noureddine Mezni, spokesman for the chairman of the African Union commission, called Mubarak’s resignation “historic” and added he hoped Egypt would emerge “a stronger and more stable nation.” But he could not say what steps the AU would take next as Egypt’s government changes power for the first time in 29 years.

“Maybe it is premature now to talk, but we are following closely,” he said. Egypt is a prominent member of the 53-nation organization and one of its larger financial contributors.