Egypt's army-backed interim prime minister has defended the government's decision to order the crushing of camps of supporters of deposed President Mohamed Morsi, saying the authorities had no choice but to act.
In a televised statement late on Wednesday, Hazem el-Beblawi said the decision to break up the protests "was not easy" and came only after the government had given mediation efforts a chance.
"We found that matters had reached a point that no self respecting state could accept," he said, citing what he described as "the spread of anarchy and attacks on hospitals and police stations".
The streets of Egypt's second city Alexandria were almost deserted on Wednesday night as security forces enforced a curfew.
The government imposed a month-long state of emergency after riot police backed by armoured vehicles, bulldozers and helicopters swept away two encampments of pro-Morsi supporters, setting off running street battles in Cairo and other Egyptian cities.
Security forces shot dead scores of people in their assault on the camps, defying international pleas to show restraint after a six-week stand-off with Morsi's Muslim Brotherhood supporters.
Vice-President Mohamed ElBaradei resigned saying peaceful means could still have been found to end the confrontation, but other members of the government have rallied behind the decision to use force.
Beblawi said the state of emergency would be for the shortest period possible, adding that the government was committed to an army-backed road map to restore democracy.
The measure, scheduled to last for a month, imposes a curfew in Cairo and several other provinces between 19:00 local time (17:00 GMT) and 06:00.
"There was a need for the state to intervene with an extraordinary measure which is the emergency law. God willing, we will continue. We will build our democratic, civilian state," he said.
At least 525 civilians were killed nationwide, many of them in the crackdown on the protest sites.
Forty-three members of Egypt's police force were among those killed, the ministry said.
| Al Jazeera's Simon McGregor-Wood was in Rabaa Square in Nasr City when security forces went in
Thousands of Morsi's supporters had been camped at two major sites in Cairo since before he was toppled by the army on July 3, and had vowed not leave the streets until he was returned to power. The death toll continues to rise, with Morsi's Muslim Brotherhood saying the actual number of dead is more than 2,000.
Police are reported to have arrested key Brotherhood leaders.
There have been calls for pro-Morsi supporters to head back out onto the streets of Cairo, despite an overnight curfew.
Al Jazeera's Sherine Tadros, reporting from Cairo, said: "We are seeing people being stopped at checkpoints, IDs being checked... If they have no reason being on the streets they are being taken to the side."
Armoured bulldozers moved into the two protest camps in Cairo shortly after dawn on Wednesday morning, firing bird shots and tear gas.
Snipers fired on the square from surrounding buildings while helicopters hovered overhead and armoured bulldozers ploughed over the protesters' makeshift defences.
They smashed through our walls. Police and soldiers, they fired tear gas at children
Masked police tore down tents and set them ablaze.
"They smashed through our walls. Police and soldiers, they fired tear gas at children," said Saleh Abdulaziz, 39, a secondary school teacher clutching a bleeding wound on his head.
Police took full control of the Rabaa al-Adawiya camp by Wednesday afternoon, according to the state news agency.
Al Jazeera's Jane Ferguson, said smaller groups had been congregating in squares and streets after the protest camp was cleared out.
"Just because they're leaving Rabaa Square doesn't mean that they're leaving protests altogether," she said.
| Al Jazeera's Omar Al saleh takes a look at some of the scenarios.
Violence spread beyond Cairo, with deadly clashes in the cities of Alexandria, Fayoum and Suez.Earlier on Wednesday, security forces took control of Nahda Square, the smaller of the two sit-ins, using tear gas and bird shots.
Two journalists were killed during the violence. Mick Deane, a cameraman for the UK-based Sky News channel, and Habiba Abd Elaziz, a reporter for the UAE-based Xpress newspaper, died from bullet wounds.
International condemnation of the violence was swift, with the US Secretary of State John Kerry calling it "deplorable".
The US did not initially criticise the overthrow of Morsi, and has avoided using the term "coup," which under US law would have halted some $1.3bn in annual military aid to Cairo.
The United Nations, the European Union, Britain, France, Iran, Qatar and Turkey strongly denounced the use of force by the military-backed interim government.
EU foreign policy chief Catherine Ashton called on security forces to "exercise utmost restraint".