Egypt unrest: How Hosni Mubarak's end came
After more than two weeks of mass demonstrations in Egypt calling for President Hosni Mubarak to step down, Vice-President Oman Suleiman announced the president had handed over power to military. The BBC's World Affairs Editor John Simpson looks at how it happened.
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 in Cairo by force.
It is 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.
There was an historical echo to that.
In 1952 many of the senior officers here preferred the monarchy, while the younger ones, including a young colonel called Gamal Abdel Nasser, favoured a successful coup against the old system.
There have only been two presidents since Nasser: Anwar Sadat and Hosni Mubarak, who took over when Sadat was murdered.
What has happened today is that the old Nasserite system, a vaguely socialist, military dictatorship, heavily dependent on an unpleasant secret police, has collapsed.
The military will continue to run Egypt for the moment, but only until the presidential elections in August or September, if not before.
After that it is impossible to say. But there cannot be a return to what Egypt has experienced until today.