Egyptian President Hosni Mubarak stepped down Friday after 30 years as president and handed control to the military, bowing down to an historic 18-day wave of pro-democracy demonstrations by hundreds of thousands.

The massive crowd in Cairo's central Tahrir Square exploded with joy, embracing, weeping and waving Egyptian flags, and car horns and celebratory shots in the air were heard around the city of 18 million in joy after Egyptian Vice President Omar Suleiman made the announcement on national TV just after nightfall.

The people have brought down the regime," chanted the crowds in the square.

“In these grave circumstances that the country is passing through, President Hosni Mubarak has decided to leave his position as president of the republic,” said a somber Suleiman. “He has mandated the Armed Forces Supreme Council to run the state. God is our protector and succor.”

Nobel Peace laureate Mohammed ElBaradei, whose young supporters were among the organizers of the protest movement, told The Associated Press: “This is the greatest day of my life.”

“The country has been liberated after decades of repression,” he said, adding that he expects a beautiful transition of power.

A senior member of the Muslim Brotherhood, Egypt's biggest opposition group, said Egyptians had achieved the main goal of their popular uprising after Mubarak's resignation.

"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.

Katatni said the Brotherhood awaits the next steps to be taken by the Higher Military Council, which has taken charge of the country's affairs after Mubarak's decision.

Earlier in the day, a ruling partly official reported that Mubarak and his family left Cairo for the Red Sea resort of Sharm el-Sheikh, proving he is giving up his presidential powers.

Protesters seeking Mubarak's overthrow moved overnight to the Ittihadiya presidential palace in the Cairo suburb of Heliopolis for the first time since demonstrations began on Jan. 25.