Egypt's armed forces gave President Mohamed Morsi 48 hours to meet the demands of the people or it would intervene with a roadmap, after millions took to the streets to demand the Islamist leader step down.
In a statement read out on state television, the armed forces reiterated its "call that the demands of the people be met and gives (all parties) 48 hours, as a last chance, to take responsibility for the historic circumstances the country is going through."
"If the demands of the people are not met in this period... (the armed forces) will announce a future roadmap and measures to oversee its implementation," the statement said.
The statement comes a day after millions took to the street demanding that Morsi resigns.
"It's an ultimatum directed to the president of the republic. He has been given 48 hours to accept what the people want and there is only one demand and that is to hold early presidential elections," said Hassan Nafea, political science professor at Cairo University.
In Tahrir Square, anti-Morsi protesters erupted in joy after the army's statement.
"Come down Sisi, Morsi is not my president," the protesters chanted, urging the country's army chief, Abdel Fattah al-Sisi, to intervene.
An official from Morsi's Muslim Brotherhood said the powerful movement was "studying" the army's statement.
Egypt is deeply divided between Morsi's Islamist supporters and a broad-based opposition.
The army had given all parties one week to reconcile their differences.
"This week, there has been no sign of gestures or acts," the army said.
"Wasting more time will lead only to more division... which we have warned and continue to warn against."
Earlier, the opposition gave Morsi a day to quit or face civil disobedience.
"We give Mohamed Morsi until 5:00 pm (1500 GMT) on Tuesday July 2 to leave power, allowing state institutions to prepare for early presidential elections," the Tamarod movement said in a statement on its website.
Otherwise, "Tuesday, 5:00 pm will be the beginning of a complete civil disobedience campaign."
The health ministry said 16 people died in protests on Sunday, including eight in clashes between supporters and opponents of Morsi outside the Brotherhood's Cairo headquarters.
Early on Monday, protesters set the Brotherhood's headquarters ablaze before storming it and looters walked away with petrol bombs, helmets, flak jackets, furniture and documents, an AFP correspondent witnessed.
"This is a historic moment. The Brotherhood ruined the country, so stealing from them is justified," one man said.
A senior government official told AFP that four ministers -- tourism, environment, communication and legal affairs -- had tendered their resignations to Prime Minister Hisham Qandil.
Tourism minister Hisham Zazou had already tried to resign last month after Morsi appointed Adel al-Khayat, a member of an Islamist party linked to a massacre of tourists in Luxor, as governor of the temple city.
Monday's resignations were a further blow to Morsi, who since coming to power has battled with the judiciary, the media and the police.
Tamarod -- Arabic for rebellion -- is a grassroots campaign which says it collected more than 22 million signatures to a petition demanding new elections.
It was behind Sunday's protests that saw millions of people demand Morsi's departure on the first anniversary of his inauguration.
Tamarod had also urged "the army, the police and the judiciary to clearly side with the popular will as represented by the crowds".
Opposition leader Hamdeen Sabbahi urged military intervention if Morsi refused to quit, stressing however that the best outcome would be for the president to leave of his own free will.
The army, which led a tumultuous transition after Mubarak's ouster, had already warned it would intervene if there was major unrest.
Morsi has been appealing for dialogue and his spokesman Ehab Fahmy told reporters on Sunday: "The presidency is open to a real and serious national dialogue."
Overnight, as protesters pelted the Muslim Brotherhood building in Cairo with petrol bombs, Brotherhood supporters responded with birdshot.
An AFP journalist also reported automatic weapons fire.
Sunday's turnout was described as the largest protest in Egyptian history and anti-Morsi ralliers were also held in Alexandria, the Nile Delta cities of Mansura, Menuf, Tanta and Mahalla, the canal cities of Suez and Port Said and the president's hometown Zagazig.
In Tahrir Square, protesters brandished red cards and Egyptian flags as patriotic songs played.
"The people want the ouster of the regime," they chanted, echoing the signature slogan of the 2011 revolt that ousted Hosni Mubarak and eventually brought Morsi to power.
Across Cairo, in Nasr City neighbourhood, supporters of the president have been gathering for days. On Sunday the army said 25,000 loyalists were on the streets.
Morsi's opponents accuse him of betraying the revolution by concentrating power in Islamist hands and of sending the economy into freefall.
Morsi supporters say he inherited many problems from a corrupt regime, and that he should be allowed to complete his term which ends in 2016.
Any attempt to remove him would be a coup, they say.