The news was greeted with a huge outburst of joy and celebration by thousands in Cairo's Tahrir Square - the heart of the demonstrations.
Mr Mubarak ruled for 30 years, suppressing dissent and protest, and jailing opponents.
US President Barack Obama said that Egypt must now move to civilian and democratic rule.
Announcing Mr Mubarak's resignation, Vice-President Omar Suleiman said the president had handed power to the army.
Mr Suleiman said on state TV that the high command of the armed forces had taken over.
"In the name of God the merciful, the compassionate, citizens, during these very difficult circumstances Egypt is going through, President Hosni Mubarak has decided to step down from the office of president of the republic and has charged the high council of the armed forces to administer the affairs of the country," he said.
Later an army officer read out a statement paying tribute to Mr Mubarak for "what he has given" to Egypt but acknowledging popular power.
Add new comment