The test of a dictator's power, and hence their ability to stay in power, is whether they have troops willing to fire on their own people.
An army that is willing to shoot demonstrators enables a dictator to maintain their power against popular uprisings. Ironically the dictator becomes the prisoner of the army which is maintaining his power through their willingness to use force.
In Egypt, the military occupies a privileged and revered position in society. For the last thirty years they have backed Mubarak, and Sadat and Gamel Abdul Nasser before that (which takes us back to 1956).
But once they made it clear that they would not fire on the demonstrators in Tahrir square, Mubarak was finished, because he had no other source of force.