Egypt's powerful armed forces issued a virtual ultimatum to Islamist president Mohammed Morsi on Monday, calling on the nation's feuding politicians to agree on an inclusive roadmap for the country's future within 48 hours.
A dramatic military statement broadcast on state television declared the nation was in danger after millions of Egyptians took to the streets on Sunday to demand that Mr Morsi quit and the headquarters of the ruling Muslim Brotherhood were ransacked.
"If the demands of the people are not realised within the defined period, it will be incumbent upon (the armed forces)... to announce a road map for the future," said the statement by chief-of-staff General Abdel Fattah Al Sisi. It was followed by patriotic music.
The people had expressed their will with unprecedented clarity in the mass demonstrations and wasting more time would only increase the danger of division and violence, he said.
The army said it would oversee the implementation of the roadmap it sought "with the participation of all factions and national parties, including young people", but it would not get directly involved in politics or government.
Anti-Morsi demonstrators outside the presidential palace cheered the army statement, and the main opposition National Salvation Front, which has demanded a national unity government for months, applauded the military's move.
It was the second time in just over a week that the armed forces had issued a formal warning to the politicians, and it appeared to pile pressure on Mr Morsi to concede power-sharing with the liberal, secular and left-wing opposition.
After the destruction of its offices, the Brotherhood which operated underground until the overthrow of Hosni Mubarak in 2011, said it was considering how best to defend itself.
Cities were quiet after Sunday's mass rallies that were bigger than anything seen since the Arab Spring uprising. But the ransacking of the Brotherhood's office highlighted deepening political polarisation, prompting the movement to talk of acting in self-defence.
Five non-Brotherhood government ministers tendered their resignations from the cabinet, apparently in sympathy with the protesters, underlining a sense of isolation for the party that won a series of elections last year.
"Both sides are still in their trenches," a senior European diplomat said just before the military statement.
Cairo's Tahrir Square was filling again in late afternoon, with thousands of people gathering for a second day.
For those who declared the protests a continuation of the revolution that toppled Mr Mubarak, images of young men waving national flags at the scorched and shattered windows of the Brotherhood compound recalled the fall of Mubarak's ruling party offices, whose charred hulk still looks out over the Nile.
Eight people died in a night of fighting around the Brotherhood building, where guards fired on youths hurling rocks and fire bombs. A Brotherhood official said two of its members were hurt. Another eight people were killed in clashes around the country on Sunday.
The Brotherhood's official spokesman told Reuters that the attack had crossed a red line of violence and among possible responses might be to revive "self-defence committees" former during the 2011 uprising.
"The people will not sit silent," Gehad El Haddad said.
Morsi's movement complained at the lack of police protection, which can only heighten its sense of being under siege from both the liberal opposition and state officialdom inherited from the old regime.
Liberal protest organisers, who declared Mr Morsi ousted by people power on Sunday, gave him a new deadline of 5pm on Tuesday to quit and call elections or face a new mass rally.
Mr Morsi, who has not appeared in person, renewed offers of dialogue via allies and pledged to work with a new parliament that could be elected if disputes over election rules can be ironed out. But he has so far made no substantial concessions.
The opposition does not trust the Islamist movement, which critics accuse of using a series of electoral victories to monopolise power. They want a total reset of the rules of a democracy imperfectly worked out over the past two years.
Mr Morsi again acknowledged through a spokesman that he had made mistakes, adding that he was working to fix them and was open to dialogue. He made similar offers last week, which were dismissed by the opposition. But he showed no sign of quitting.
An aide to Mr Morsi outlined three ways forward: parliamentary elections, which he called "the most obvious"; national dialogue, which he said opponents had repeatedly rejected; and third, early presidential elections, as demanded by protesters.
But that, he said, "simply destroys our democracy".
The massive protests showed that the Brotherhood has not only alienated liberals and secularists by seeking to entrench Islamic rule, notably in a new constitution, but has also angered millions of Egyptians with economic mismanagement.
Tourism and investment have dried up, inflation is rampant and fuel supplies are running short, with power cuts lengthening in the summer heat and motorists spending hours fuelling cars.
The cost of insuring government debt against default surged to record highs. Forward contracts indicated a significant fall for the pound against the dollar.
Protest organisers called on Egyptians to keep occupying central squares across the country in a campaign of peaceful civil disobedience until Mr Morsi goes.
Up to now, the Brotherhood has interpreted the army's stance as an endorsement of Mursi's electoral legitimacy. However, his opponents believe the generals are now clearly pressing the president to relent. Army helicopters were counting protesters on Sunday.
Some uniformed policemen marched among protesters in Cairo and Alexandria, chanting "the police and the people are one", and several senior officers addressed the Tahrir Square crowd.
Adding to the failure to protect the Brotherhood headquarters, that cast doubt on whether Mr Morsi could rely on the security forces to clear the streets if he gave the order.
Opposition leaders, who have seen previous protest waves fizzle after a few days in December and January, were to meet on Monday afternoon to plot their next move.
Condemning the violence, their coalition leadership said: "We call upon the great Egyptian people who turned out in millions ... demanding democratic transition and early presidential elections, to maintain the peaceful nature of this great new revolutionary wave, and to remain steadfast in the streets and squares until their demands are met."
The United States and the European Union have urged Mr Morsi to share power with the opposition, saying only a national consensus can help Egypt overcome a severe economic crisis and build democratic institutions.