Egypt’s powerful military warned on Monday that it will intervene if the Islamist president doesn’t “meet the people’s demands,” giving him and his opponents two days to reach an agreement in what it called a last chance. Hundreds of thousands of protesters massed for a second day calling on Mohammed Morsi to step down.

Military helicopters, some dangling Egyptian flags, swooped over Cairo’s Tahrir Square where many broke into cheers with the army’s announcement, read on state television. The statement seemed to fuel the flow of crowds across the country into city squares, where protesters chanted and sang.

“Come out, el-Sissi. The people want to topple the regime,” protesters in the Nile Delta city of Mahalla el-Kubra chanted, urging military chief Gen. Abdel-Fattah el-Sissi to intervene.

The military’s statement puts enormous pressure on Morsi and his Muslim Brotherhood. So far, the president has vowed he will remain in his position, but the opposition and crowds in the street — who numbered in the millions nationwide Sunday — have made clear they will accept nothing less than his departure and a transition to early presidential elections.

That makes action by the generals when the deadline runs out nearly inevitable, because a deal seems unlikely. The statement did not define the “people’s demands” that must be met. But it strongly suggested that Sunday’s gigantic rallies expressed the desire of Egyptians, raising the likelihood it would insist on Morsi’s departure.

“We understand it as a military coup,” one adviser to Morsi told The New York Times, speaking on condition of anonymity. “What form that will take remains to be seen.”

An army move against Morsi, however, risks a backlash from his Islamist supporters, who include hard-line former militants.

Morsi met Monday with el-Sissi and Prime Minister Hesham Kandil, according to the president’s Facebook page, without giving further details.

Already, the military’s presence in Cairo has increased at sensitive spots the past two days. Troops Monday manned checkpoints on roads leading to a pro-Morsi rally of Islamists near his palace. They checked cars for weapons after repeated reports some Islamists were arming themselves.

Morsi’s backers have been infuriated by what they call an opposition move to forcibly overthrow Egypt’s first president chosen in a democratic election. Some see the campaign as aimed at defeating the “Islamist project.”

In the evening, the pro-president rally outside the Rabia al-Adawiya Mosque not far from the Ittihadiya palace also swelled, though it was eclipsed by the opposition rallies. Its participants blew whistles and waved banners with Morsi’s picture on it.

“The military has sacrificed legitimacy. There will be a civil war,” Manal Shouib, a 47-year-old physiotherapist at the pro-president rally outside the Rabia al-Adawiya Mosque not far from Ittihadiya.

In a sign of Morsi’s growing isolation, five Cabinet ministers said Monday they have resigned their posts to join the protest movement, the state news agency said. The five are the ministers of communications, legal affairs, environment, tourism and water utilities, MENA reported.

The military praised the anti-Morsi protests as “glorious,” saying the participants expressed their opinion “in peaceful and civilized manner,” and that “it is necessary that the people get a reply … to their calls.”

The military underlined it will “not be a party in politics or rule.” But it said it has a responsibility to act because Egypt’s national security is facing a “grave danger,” according to the statement.

It said it repeats its call “for the people’s demands to be met,” giving all sides 48 hours “as a last chance to shoulder the burden of the historic moment.”

If the demands are not realized in that time, the military would be obliged to “announce a road-map for the future and the steps for overseeing its implementation, with participation of all patriotic and sincere parties and movements … excluding no one.”