Egypt’s military gave a “last-chance” ultimatum Monday to President Mohammed Morsi, giving him 48 hours to meet the demands of millions of protesters, or the generals will intervene and impose their own plan.

The military’s statement put enormous pressure on Morsi to step down. Giant crowds demanding his departure in cities around the country for a second straight day erupted into delirious parties of celebration.

But any army move against Morsi after the two-day deadline risks a backlash from Morsi’s Islamist backers, including his powerful Muslim Brotherhood.

After the army statement, multiple officials of Morsi’s Muslim Brotherhood insisted that the military and street protests cannot overturn the legitimacy of the president’s election. Pro-Morsi marches began after nightfall in a string of cities around the country. In Cairo, thousands of Islamists massing outside a mosque near the Ittihadiya presidential palace reacted with shock and fury to the military announcement.

The army’s stance also raises a unsettling prospect for many of Morsi’s opponents as well — the potential return of the military that ruled Egypt directly for nearly 17 months after the Feb. 11, 2011 fall of autocrat Hosni Mubarak.

Hours after its announcement, the military issued a second statement on its Facebook page denying it intended a coup.

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.

In a sign of Morsi’s growing isolation, five Cabinet ministers said on Monday they have resigned their posts, the state news agency said.

Sunday’s protests were the largest seen in Egypt in the 2½ years of turmoil since protesters first rose up against Mubarak in January 2011.

In Cairo, anti-Morsi youth attacked the main headquarters of the Muslim Brotherhood with stones and fire-bombs, while Brotherhood supporters barricaded inside open fired on them. The clash ended early Monday morning when the protesters broke into the luxury villa and ransacked it, setting fires.

The crowds turned out again Monday across the country — in slightly smaller numbers, but in a more uproariously joyous mood after the military’s announcement gave them hope of a quick victory. The group organizing the protests, Tamarod, Arabic for “Rebel,” issued an ultimatum of its own, giving Morsi until Tuesday afternoon to step down or it would escalate the rallies even further.