"The people of Egypt have spoken. Their voices have been heard and Egypt will never be the same," the president said. "By stepping down, President Mubarak responded to the Egyptian people's hunger for change, but this is not the end of Egypt's transition. It's the beginning."
Obama praised the protesters and their peaceful demonstrations that have rocked the country for the past 18 days.
"Over the last few weeks, the wheel of history turned at a blinding pace," he said.
The president called on Egypt's new leadership to lift the controversial emergency law that has been in place almost continuously since 1967 and gives the government far-reaching powers at the expense of judicial review and civil liberties. He also urged a peaceful and constructive transition to free and fair elections.
Egyptians celebrated late into the night. People streamed into Cairo's Tahrir Square dancing, honking car horns and waving flags. Fireworks were shot off in the square that has become the heart of the uprising.
As Mubarak's long-awaited announcement was made earlier byVice President Omar Suleiman, crowds erupted into loud cheers, chanting "Egypt is free, Egypt is free."
Watch a special, one-hour edition of "Nightline: Revolution Day," anchored by Terry Moran live from Cairo, at 11:35 p.m. ET.
"My fellow citizens. In this difficult time that the country is going through, President Mohamed Hosni Mubarak has decided to relieve himself of his position as president and the Supreme Military Council has taken control of the state's affairs. May God protect us," Suleiman said in a somber one-minute announcement.
The military's spokesman also went on state television to thank Mubarak for his service and said it is reviewing the situation. Saluting those who have died in the nearly three weeks of protests, the military hailed the "martyrs" and said the army will guarantee that the demands of the Egyptian people be met.
He reiterated that the army is not a substitute for the legitimacy the people want and that the military will announce concrete steps soon.
Mubarak, who ruled for 30 years, is the second Arab leader forced to quit by a remarkable populist and largely peaceful uprising. Last month, Tunisia's president Zine al-Abidine Ben Ali resigned and left the country in the face of massive street protests against his regime.
Egypt's high military council, which has taken over the country, is headed by Defense Minister Mohammed Hussein Tantawi. He was made deputy prime minister just two weeks ago in an effort to appease protesters, and visited Tahrir Square during the demonstrations.
"Welcome back Egypt," tweeted Google executive Wael Ghonim, who became the face of protests since he was detained by security forces last month.
Men, women and children -- many with tears in their eyes -- flooded Cairo's streets as the atmosphere turned from one of determination to pure ecstasy.
"The Egyptian people won," a thrilled Amr Hamadi said.