CAIRO (AP) -- 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, put enormous 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 on both sides the military could outright take over, 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.
Pro-Morsi marches numbering in the several thousands began after nightfall in a string of cities around the country, sparking clashes in some places. An alliance of the Brotherhood and Islamists read a statement at a televised conference calling on people to rally to prevent "any attempt to overturn" Morsi's election.
"Any coup of any kind against legitimacy will only pass over our dead bodies," one leading Brotherhood figure, Mohammed el-Beltagi, told a rally by thousands of Islamists outside a mosque near the Ittihadiya presidential palace.
A line of around 1,500 men with shields, helmets and sticks -- assigned with protecting the rally -- stamped their feet in military-like lines, singing, "Stomp our feet, raise a fire. Islam's march is coming."
After midnight, Morsi's office issued a statement saying a "modern democratic state" was one of the main achievements of the anti-Mubarak revolution, adding, "With all its force, Egypt will not allow itself to be taken backward." It said Morsi was still reviewing the military's statement, but added some parts of it "could cause disturbances in the complicated national scene."
U.S. President Barack Obama said the U.S. is committed to democracy in Egypt, not any particular leader. Traveling in Tanzania, Obama said that although Morsi was democratically elected, the government must respect its opposition and minority groups.
Egypt's Presidency said in a statement that Morsi received a phone call from Obama. According to the statement, Obama said the US administration "supports peaceful democratic transition in Egypt."
Army troops at checkpoints on roads leading to the pro-Morsi rally searched cars for weapons after reports that some Islamists were arming themselves.
In the second day straight day of anti-Morsi protests nationwide, men and women danced outside the Ittihadiya palace, some cried with joy and bands on a stage played revolutionary songs after the military's statement.
But the army's stance also raises an unsettling prospect for many of them as well. Many expressed worries of an army takeover. During the time the generals were in power, many of those now in the anti-Morsi campaign led demonstrations against military rule, angered by its management of the transition and heavy hand in the killing of protesters.
"Morsi will leave, but I'm concerned with the plan afterward. The military should be a tool to pressure, but we had a bitter experience with military ruling the country, and we don't want to repeat it," said Roshdy Khairy, a 24-year-old doctor among the throngs in Tahrir Square.
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 -- a virtual impossibility. 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 heavily praised the massive protests that began Sunday demanding that Morsi step down and that early elections be called -- suggesting that call had to be satisfied. It said the protests were "glorious," adding that the participants expressed their opinion "in peaceful and civilized manner." It urged "the people's demands to be met."