Even in Israel, which had watched Egypt's 18-day uprising against Mubarak with some trepidation, 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 and spoke to him just a day earlier, told Israel TV's Channel 10.
The boisterous street celebrations erupted within moments of the dramatic announcement by Egyptian Vice President Omar Suleiman that Mubarak had stepped down. The success of Egypt's protesters in ousting a longtime ruler came less than a month after a pro-democracy movement in Tunisia pushed dictator Zine El Abidine Ben Ali into exile in Saudi Arabia on Jan. 14.
The breakneck speed of developments, after decades of authoritarian rule in many Arab countries, left some of those celebrating Friday wondering where regime change might come next.
"We are very happy today that we were able to overcome the dictator Hosni Mubarak. Tomorrow will be the turn of the dictators in the entire Arab world," said Issam Allawi, an Egyptian celebrating with dozens outside the Egyptian Embassy in Beirut.
Two of Egypt's neighbors - Israel and the Palestinians - followed the historic moment particularly closely.
Israel's greatest concern in the past two weeks has been that its 1979 peace treaty with Egypt might not survive under a new government, particularly if Egypt's Muslim Brotherhood - the largest and most organized opposition group - gains influence. The Palestinian offshoot of the Brotherhood, the Islamic militant Hamas, seized control of the Gaza Strip, on Israel's doorstep, in 2007.
Israel's government did not comment Friday. However, Israel's former U.N. representative, Dan Gillerman, told Fox News that "if the radicals prevail (in Egypt) then we will have Hamas in Gaza, the Hezbollah in Lebanon and the Muslim Brotherhood in Egypt, which would be devastating not just for Israel but for the stability of the whole region."
Egypt's uprising was led by young secular Egyptians, with the Brotherhood largely remaining in the background.
In Gaza, hopes were rising that a nearly four-year-old blockade of the Hamas-ruled territory might be coming to an end. Egypt had helped Israel enforce the blockade, which has kept some 1.5 million people confined to the tiny territory.
Across Gaza, many thousands rushed into the streets late Friday. Gunmen fired in the air and women distributed 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 those handing out sweets.
Hamas leaders called on the new Egypt to open the borders with Gaza. "Egypt wrote today a new chapter in the history of the Arab nations and I can see the blockade on Gaza shaking right now," Gaza's Hamas prime minister, Ismail Haniyeh, told reporters.
Hamas security sent reinforcements to the Gaza-Egypt border to prevent any possible chaos there, including attempts to break through the blockade. In a Hamas-engineered border breach in 2008, hundreds of thousands of Gazans had briefly spilled into Egypt.
The governments of Jordan, Iraq and Sudan said Friday they respect the will of the Egyptian people. "The resignation of Hosni Mubarak is a step in the right direction," said a statement by Iraq's prime minister, Nouri al-Maliki.
Anti-government protests have erupted in recent weeks in Jordan and Iraq, with demonstrators complaining of corruption, lack of services and rising prices. Sudan is run by an autocratic leader wanted for war crimes he is accused of orchestrating in the country's restive Darfur region.
Across the Middle East, many thousands celebrated in the streets.
In Tunisia, 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.
On Lebanon's Al-Manar TV, the station run by the Shiite Muslim Hezbollah faction, Egyptian anchor Amr Nassef, who was once imprisoned in Egypt for alleged ties to Islamists, cried on the air. "Allahu Akbar (God is great), the Pharaoh is dead. Am I dreaming? I'm afraid to be dreaming," he said.
In Jordan's capital of Amman, thousands gathered outside the Egyptian Embassy shouted "mabrouk, mabrouk," Arabic for "congratulations," as fireworks burst into the sky. The crowd included members of the 500,000-strong Egyptian expatriate community in Jordan. Some burned a portrait of Mubarak.
"This is the best day of my life. It's a new era for Egypt," said Hawary el-Saudi, 24, an Egyptian construction worker working in Jordan for the past year. "Hosni Mubarak has been clinging on to power long before I was even born. He made us live a low life. He forced poor people like me to go aboard to work and make money."
Celebrations were also held in several cities in Yemen, the Arab world's poorest nation, where protesters have also taken on the government of longtime leader Ali Abdullah Saleh after the uprisings in Tunisia and Egypt. In the capital, Sanaa, more than 3,000 people marched from Sanaa University to the Egyptian Embassy.
In Baghdad, lawmakers from all of Iraq's major political parties cheered Mubarak's resignation as a win for democracy - a system still in its infancy in that nation.
"The resignation of Mubarak represents one of the marvelous days in history," said Sunni lawmaker Jamal al-Battekh, a member of the Iraqiya political alliance. "No one can stand against the will of the nation or especially the will of the youth, who have the ability to say no to the dictator of Egypt."
Associated Press writers Ian Deitch in Jerusalem, Ibrahim Barzak in the Gaza Strip, Jamal Halaby in Amman, Jordan, Lara Jakes in Baghdad, Mohammed Osman in Khartoum, Sudan, Bouazza Ben Bouazza in Tunis and Ahmed al-Haj in Sanaa, Yemen, contributed to this report.