Hosni Mubarak stepped down as president of Egypt and handed power to the military, bowing to the demands of protesters who have occupied central Cairo for the past three weeks demanding an end to his 30-year rule.

“Mubarak has decided to relinquish the office of the presidency,” said Vice President Omar Suleiman in a statement on state television today. “He has instructed the Supreme Council of the armed forces to take over the affairs of the country.”

The resignation came after Egyptians streamed out of Friday prayers vowing to topple Mubarak, 82, after he yesterday defied calls for him to leave for the second time this month. Military helicopters buzzed the presidential palace at dusk and Arabiya television earlier reported that Mubarak had left Cairo for the Sinai resort of Sharm El-Sheikh.

The announcement opens a new phase in a crisis that was sparked by the ouster of Tunisian President Zine El Abidine Ben Ali on Jan. 14 and is rippling through the Arab world, which holds more than 50 percent of the world’s oil reserves.