BBC News with Fiona MacDonald
The Egyptian President Hosni Mubarak has resigned after more than two weeks of growing protests against him across the country. The news was greeted with a massive outburst of joy and riot celebration by hundreds of thousands of people in Tahrir Square in Cairo, the heart of the demonstrations. This woman was delighted that the protesters achieved their goal without having to resort to violence.
"Well, we're just very, very, very, very happy about this, and really happy that we're able to do it peacefully. This is probably the first Middle East or Arab revolution that happened with no violence, although it started with some violence. But we've proved that. We're here peacefully. We're just asking for basic human rights, and it shows you that determination gets you what you want, and we're really looking forward to a really bright future in the country."
Mr Mubarak's powers will be taken over by the Supreme Council of the Armed Forces. It said it understood the people's demand for a radical change. But with the civilian leadership sidelined, a BBC correspondent in Cairo says the situation looks very much like a military coup. However, the Egyptian opposition figure Mohamed ElBaradei said he believes the army is just taking over to ensure a smooth transition.
"In the mess we were to end in the last two and three weeks, I in fact ask today for the army intervention. This is a state of emergency. I think the army has had the duty to come to save Egypt from going down the drain, but it doesn't mean that they are there forever. They are there with these people to help to ensure stability."
A senior Muslim Brotherhood leader, Essam al-Arian, said that Egyptians had made history and were adding a new model of democracy to the world. The leader of the opposition al-Ghad party, Ayman Nour, spoke of the nation being born again.
The protests began on the 25 January, partly inspired by the demonstrations that drove the Tunisian President Zine El Abidine Ben Ali from power, partly driven by Egypt's economic problems and anger against what many saw as a corrupt regime. John Simpson looks at what made President Mubarak leave now.
For 18 days, the stubbornness of one elderly man has been pitted against the will of millions here. The Egyptian army found itself in the middle, unwilling until the very end to force President Mubarak out, yet deeply hostile to any suggestion that the soldiers should remove the demonstrators from Tahrir Square by force. It's still too soon to know for certain what made Mr Mubarak step down, but it seems a reasonable assumption that the army leadership could see the hairline cracks appearing among their own officer corps. The generals were inclined to side with the president, one of their own, and the more junior officers sympathised with the demonstrators.
World News from the BBC
President Barack Obama has welcomed President Mubarak's resignation. He called on the military to lift the state of emergency and start preparing the way for free and fair elections. He said he was optimistic about Egypt's political future.
"This is not the end of Egypt's transition. It's a beginning. I'm sure there will be difficult days ahead and many questions remain unanswered. But I am confident that the people of Egypt can find the answers and do so peacefully, constructively, and in the spirit of unity that has defined these last few weeks."
Other world leaders, among them the UN Secretary General Ban Ki-moon, have reacted too. Mr Ban said the voice of the Egyptian people had been heard.
In Tunisia, where people overthrew their own president last month, there was dancing in the streets and car horns were blaring in celebration of President Mubarak's resignation. There was also jubilation across the Palestinian territories. The Hamas movement, which controls the Gaza Strip, said it was the start of the Egyptian revolution.
President Mubarak was appointed vice president after a successful career in the military and became leader following the assassination of the President Anwar Sadat in 1981. Caroline Hawley has this assessment of Hosni Mubarak's career.
It was amid turmoil that Hosni Mubarak became president when his predecessor Anwar Sadat was assassinated in 1981. A military man, stability was the obsession of his regime at the expense of human rights, but he was violently opposed by Islamist extremists, and his rule was challenged by the Muslim Brotherhood, and more recently by a growing secular opposition inspired by the revolution in Tunisia. It was they who brought the people onto the streets. President Mubarak made a series of concessions. All were too little, too late.