At least 24 people died across Egypt on Friday as Islamists opposed to the overthrow of President Mohamed Mursi took to the streets to vent their fury at what they say was a military coup.
Fierce clashes in the Mediterranean city of Alexandria left 12 dead and 200 injured, while in Cairo, five people were killed as pro- and anti-Mursi protesters ran amok in central areas and armored personnel carriers rumbled among them to restore calm.
Five police officers were gunned down in separate incidents in the North Sinai town of El Arish, and while it was not clear whether the attacks were linked to Mursi's ouster, hardline Islamists there have warned they would fight back.
Tens of thousands of people marched across the country in what Mursi's Muslim Brotherhood movement called a "Friday of Rage" to demonstrate against his overthrow and the army-backed interim government being set up to prepare for new elections.
A new prime minister could be named as early as Saturday.
Egypt's first freely elected president was toppled on Wednesday, the latest twist in a tumultuous two years since the fall of Hosni Mubarak in the Arab Spring uprisings that swept the region in 2011.
The events of the last week have aroused concern among Egypt's allies in the West, including key donors the United States and the European Union, and in neighboring Israel, with which Egypt has had a U.S.-backed peace treaty since 1979.
Friday's fatalities added to the dozens of deaths in a month of unrest. Last Sunday, huge rallies in Cairo and other cities called for Mursi's resignation, venting anger over economic stagnation and perceptions of a Brotherhood power grab.
His overthrow was greeted with wild scenes of celebration but infuriated supporters who fear a return to the suppression of Islamists they endured under generations of military rule.
It has deepened Egypt's crisis. With its supporters enraged by Mursi's removal from power, the Brotherhood says it wants nothing to do with what the army has billed as an inclusive transition plan, culminating in fresh elections.
The military has given scarce details - its road map gave no timeframe for a new ballot - adding to political uncertainty at a time when many Egyptians fear violence could polarize society even further.
Leftist former presidential candidate Hamdeen Sabahi told Reuters he hoped the transition could last only six months. And, in common with allies on the liberal left, he insisted there had been no military coup. He called the idea an insult to Egypt.
In an early incident that raised tensions in Cairo, three protesters were shot dead outside the Republican Guard barracks where deposed Mursi is being held, security sources said.
The army denied blame for the shootings. An army spokesman said troops did not open fire on the demonstrators and soldiers used blank rounds and teargas to control the crowd.
It was unclear whether security forces units other than army troops were also present.
Later, tens of thousands of cheering Islamists gathered near a mosque in a Cairo suburb where they were addressed by Brotherhood leader Mohamed Badie, free to address them despite reports on Thursday that he had been arrested.
Badie, like some other leaders, pledge that it was worth "our lives" to restore Mursi to the presidency. But Brotherhood officials have also insisted they will not resort to violence.
After dark, running battles broke out in the area between Tahrir Square and the state broadcasting headquarters. Reuters journalists saw hundreds of youths from either side skirmish around the highway ramps of a major bridge over the Nile.
There was some shotgun fire, rocks flew and fireworks shot between rival groups. A car was burned out. Protesters erected makeshift shields for protection. The Brotherhood said 18 of its supporters were wounded after they were attacked by "thugs".
Reuters journalists saw several men with shotgun wounds.
The army, which had pledged to protect demonstrators and keep rival factions apart, had troops in the area but violence only ended after some three hours when half a dozen armored personnel carriers arrived and took up position on the bridge.
Islamists also took to the streets in cities across the country, including Assiut, Damanhour, Ismailia, and in the Nile Delta towns of Gharbeya and Beheira.
In the Sinai peninsula bordering Israel, where Egypt has struggled to control security since Mubarak was toppled, five police officers were gunned down in separate attacks in the town of El Arish, medical sources said.
Hardline Islamist groups have exploited a collapse in state authority after the uprising to launch attacks into Israel and on Egyptian targets.
The violence will ring alarm bells in the United States. Washington has so far avoided referring to the army's removal of Mursi as a "coup", a word that under U.S. law would require a halt to its $1.5 billion in annual aid.
Mursi's opponents also say it was not a coup but an intervention to impose the "people's will".
The Brotherhood's key political strategist, Khairat El-Shater, became the latest senior figure to be arrested since Mursi's removal.
A legal technicality forced Shater's withdrawal from the presidential campaign last year, promoting Mursi into being the movement's candidate.
Brotherhood spokesman Gehad El-Haddad said the movement was faced with a crackdown from a state establishment unreformed from the days of Mubarak: "It's the old police state of Mubarak with every ingredient and nightmare that it had before the January 25 revolution. It's as if we hit the reset button."
But many Egyptians saw the military as a guarantor of stability at a dangerous time for the largest Arab nation of 84 million people.
"Maybe they will need to issue a curfew. Maybe the trouble will last a few days," said Said Asr, 41, sitting with friends outside a Cairo cafe smoking a cigarette. "But the army is everything in this country. And they are taking control."