Egyptian security forces surrounded a Cairo mosque full of supporters of ousted president Mohamed Morsi on Saturday as protesters planned fresh marches after street battles left more than 80 dead.
The tense stand-off at the Al-Fath mosque came after bloody clashes killed 83 people nationwide and resulted in the arrest of more than 1,000 alleged supporters of Morsi's Muslim Brotherhood.
The crackdown has divided Egyptians as never before in recent history, splintering the army-installed interim government and inviting international censure.
One protester said nearly 1,000 people were trapped in the mosque, which had earlier held the bodies of more than 20 people killed in Friday's clashes.
Television footage showed troops inside the mosque apparently trying to persuade the protesters to give themselves up.
A protester inside the mosque told AFP by telephone that they were demanding they not be arrested, or attacked by hostile civilians who appeared to be gathered outside the mosque.
"Thugs tried to storm the mosque but the men barricaded the doors," another protester inside the mosque told AFP earlier.
It was not clear whom she meant by "thugs."
Security officials quoted by the official MENA news agency said that "armed elements" had been shooting at security forces and police from inside the mosque.
Morsi's Freedom and Justice Party (FJP) pleaded for another "massacre" to be avoided after at least 578 people were killed across the country on Wednesday when police cleared protest camps set up by loyalists of the former president, deposed by the military on July 3.
It was not possible to verify the numbers in the mosque independently.
The latest unrest started as Morsi supporters emerged from mosques in the capital to protest in what they billed as a "Friday of anger" following Wednesday's bloodbath.
Violence erupted almost immediately, with gunshots ringing out in Cairo and security forces firing tear gas.
In the capital, a man leapt off a bridge near a police station to escape shooting as police armoured vehicles advanced on protesters, witnesses said.
An AFP correspondent counted at least 19 bodies in one Cairo mosque, while witnesses said more than 20 corpses had been laid out in another.
Elsewhere in Egypt, 10 people were killed by security forces and dozens injured in the canal city of Suez when they gathered to protest in defiance of the curfew.
Their deaths brought to 83 the number killed in nationwide violence although the FJP spoke of 130 dead in Cairo alone.
Marches were also reported in the Mediterranean city of Alexandria, in Beni Sueif and Fayyum, south of Cairo, and in the Red Sea resort town of Hurghada.
The demonstrations ended shortly after a night-time curfew came into effect but Anti-Coup Alliance spokesman Gehad El-Haddad said that Morsi loyalists would hold "daily anti-coup rallies" going forward.
The interior ministry said "the number of Muslim Brotherhood elements arrested reached 1,004," including 558 in Cairo alone.
The Egyptian cabinet issued a defiant statement after the unrest, saying it was confronting a "terrorist plot."
"The cabinet affirms that the government, the armed forces, the police and the great people of Egypt are united in confronting the malicious terrorist plot by the Muslim Brotherhood," it said.
And the interior ministry, which authorised police to use live fire if government buildings came under attack, accused the Brotherhood of attacking police stations, saying it foiled attempts to storm buildings.
EU foreign policy chief Catherine Ashton described the violence as "shocking".
"I have asked member state representatives to debate and coordinate appropriate measures to be taken by the European Union in response to the situation in Egypt," she said.
French President Francois Hollande discussed the crisis with counterparts in London, Berlin and Rome.
Germany said it would review ties with Cairo, and joined France and Britain in calling for EU talks on the situation, which are expected to take place on Monday.
President Barack Obama said the US was cancelling a joint US-Egyptian military exercise, but stopped short of suspending Washington's annual $1.3 billion in aid.
Human rights organisation Amnesty International called for a full and impartial investigation into the bloodshed, saying the authorities' response to the protests had been "grossly disproportionate".
But the international response was not uniformly critical. Saudi Arabia and Jordan said they backed Egypt's fight against "terrorism".