A furious wave of protest swept Egypt's President Hosni Mubarak from power on Friday after 30 years of one-man rule, sparking jubilation on the streets and sending a warning to autocrats across the Arab world and beyond.

Mubarak, the second Arab leader to be overthrown by a popular uprising in a month, handed power to the army after 18 days of relentless rallies against poverty, corruption and repression caused support from the armed forces to evaporate.

Ecstatic Egyptians celebrated a peaceful "White Revolution" in carnival mood on the streets and people embraced in Tahrir, or Liberation, Square, the main focus for protest, claiming a victory over their "Pharoah" they hardly dared to believe.

"Nightmare over!" said tailor Saad el Din Ahmed, 65, in Cairo. "Now we have our freedom and can breathe and demand our rights. In Mubarak's era, we never saw a good day. Hopefully now we will see better times," said Mostafa Kamal, 33, a salesman.

In the United States, Mubarak's long-time sponsor, President Barack Obama said: "The people of Egypt have spoken." He stressed to the U.S.-aided Egyptian army that "nothing less than genuine democracy" would satisfy people's hunger for change.

There was a note of caution in the background, however, over how far the military under Field Marshal Mohamed Hussein Tantawi, Mubarak's veteran defense minister, are ready to permit a democracy -- especially since the hitherto banned Islamist Muslim Brotherhood is one of the best organized forces.

In a statement, the higher military council said it would take measures for an interim phase and hoped to realize people's hopes. Striking the even-handed note the military has maintained throughout the crisis, it praised Mubarak for resigning "in the interests of the nation" and the "martyrs" who died protesting.

A senior member of the Muslim Brotherhood said Egyptians had achieved the main goal of their popular uprising.

"I salute the Egyptian people and the martyrs. This is the day of victory for the Egyptian people. The main goal of the revolution has been achieved," Mohamed el-Katatni, former leader of the Brotherhood's parliamentary bloc, told Reuters.

But also expressing caution about the military's role in Egypt's future, Katatni said the Brotherhood awaited the next steps to be taken by the Higher Military Council which has taken charge of the country's affairs after Mubarak's decision.

"This is the greatest day of my life," said liberal activist and Nobel Peace laureate Mohamed ElBaradei, welcoming a period of sharing of power between the army and the people. He told Reuters that running for president was not on his mind.

"This nation has been born again, these people have been born again, and this is a new Egypt," said Ayman Nour, the only man to dare to challenge Mubarak in Egypt's only multi-candidate presidential election. He came a distant second to the incumbent in 2005, then found himself thrown in jail.

Protesters waved flags, set off fireworks and beat drums to celebrate this new chapter in modern Egyptian history. SMS text messages of congratulation zapped over mobile phone networks among ordinary Egyptians, hailing a victory for people power.

A speaker made the announcement in Tahrir Square where hundreds of thousands danced and sang, chanting: "The people have brought down the regime." Others shouted: "Allahu Akbar" (God is greatest). Women ululated in jubilation.

Some declared an end to injustice. Others said they finally saw hope in a country they feel has lost its place as the political, cultural and economic heart of the Arab world. Most were just proud to be Egyptian on a day when history was made.

Al Arabiya said an army statement would announce the sacking of the cabinet, the suspension of the upper and lower houses of parliament and that the head of the constitutional court would lead with the military council.

The tumult over Mubarak's refusal to resign had tested the loyalties of the armed forces, which had to choose whether to protect their supreme commander or ditch him.

After the fall on Jan. 14 of Tunisia's long-time leader Zine al-Abidine Ben Ali, which inspired protests around the region, Egyptians had been demonstrating in huge numbers against rising prices, poverty, unemployment and their authoritarian regime.

World powers had increasingly pressured Mubarak to organize an orderly transition of power.

Mubarak was thrust into office when Islamists gunned down his predecessor Sadat at a military parade in 1981.

The burly former air force commander proved a far more durable leader than anyone imagined at the time. He promoted Middle East peace abroad and more recently backed economic reforms at home.