CAIRO -- Egypt's military issued a "last-chance" ultimatum Monday to President Mohammed Morsi, giving him 48 hours to meet the demands of millions of protesters in the streets seeking the ouster of the Islamist leader or the generals will intervene and impose their own plan for the country.
The military's statement, read on state TV, raised pressure on Morsi to step down and sent giant crowds opposing the president in Cairo and other cities into delirious celebrations of singing, dancing and fireworks. But the ultimatum raised worries that the military could take over outright, as it did after the 2011 ouster of autocrat Hosni Mubarak.
It also raised the risk of a backlash from Morsi's Islamist backers, including his powerful Muslim Brotherhood and hard-liners, some of whom once belonged to armed militant groups. Already they vowed to resist what they depicted as a threat of a coup against a legitimately elected president.
Hours after its announcement, the military issued a second statement on its Facebook page denying it intended a coup. "The ideology and culture of the Egyptian armed forces does not allow for the policy of a military coup," it said.
In its initial statement, the military said it would "announce a road map for the future and measures to implement it" if Morsi and its opponents cannot reach a consensus within 48 hours. It promised to include all "patriotic and sincere" factions in the process.
The military underlined it will "not be a party in politics or rule." But it said it has a responsibility to find a solution because Egypt's national security is facing a "grave danger," according to the statement. It did not detail the road map, but it praised the protests that began Sunday and urged "the people's demands to be met."
Pro-Morsi marches numbering in the several thousands began after nightfall around the country, sparking clashes in some places.
After midnight, Morsi's office issued a statement, saying Morsi was still reviewing the military's statement, but added some parts of it "could cause disturbances in the complicated national scene."
Troops at checkpoints on roads leading to the pro-Morsi rally searched cars for weapons after reports that some Islamists were arming themselves.
President Barack Obama said the United States is committed to democracy in Egypt, not any particular leader. Obama, who was in Tanzania, said that although Morsi was democratically elected, the government must respect opposition and minority groups.
Morsi met with military chief Abdel-Fattah el-Sissi and Prime Minister Hesham Kandil, according to the president's Facebook page, without giving details.
Five cabinet ministers -- those of communications, legal affairs, environment, tourism and water utilities -- said they have resigned, state news agency MENA reported. The foreign minister also resigned, government officials said.