The tense standoff at the al Fath mosque came after bloody clashes that killed 83 people across the country 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 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.
Soldiers had offered to evacuate the women but insisted on questioning the men, which the protesters refused, a demonstrator on the scene said.
Both sides accused the other of opening fire but the gunfire then ended, one person inside the mosque told AFP.
"Thugs tried to storm the mosque but the men barricaded the doors," she said.
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 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 a second mosque.
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 told AFP that Morsi loyalists would hold "daily anti-coup rallies" going forward.
The interior ministry said in a statement early Saturday that "the number of Muslim Brotherhood elements arrested reached 1004," including 558 in Cairo alone.
COMMENTS (11)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ
@Yusuf: And OIC should also condemn Pakistani Army for having removed elected governments by Coups in the past!
@PRO PAK: Please do a Google search for "Islamists burn churches in Egypt" and see many confirmations by news organizations of these arson attacks on Coptic Christians!
@Toba Alu: You where only person who reporting there since clash started may be..neither any media BBC,CNN confirms this news,,,stop it plz
OIC meeting must take place for condemnation and Action against the Coup take over of Democratic elected government in Egypt.
Pakistan should call for an urgent OIC meeting to pressurize the egyptian govt and stop this ruthless massacre. We should also hold talks with turkish counterparts as they have called off their diplomatic relations in protest. Keeping silent will serve no one interest as this must be stopped because people are just demanding their rights and they are being fired upon indiscriminately.
@Gill
USA was first to condemn violence, cancelled delivery of fighter jets, cancelled joint military exercises, has called for UN security council meeting, and has initiated review to determine whether aid should be cut off. The Egyptian military has been put on notice/warned by Obama, Kerry and the Pentagon. Suggest you Google NATO as you apparently don't know what it is or why it has nothing to do with Egypt.
@Gill: why should US act????????If they act they are interfering if they don't than also they are interfering............
Instead of US why Pakistani's and other muslim countries not condemn Saudi arab and GCC for there support for the army..........
All the liberal and seculars in Pakistan are now really happy. Because the reason is, in Egypt General Abdel Fattah al-Sisi overthrown the President Morsi’s fairly elected government by a illegal and illegitimated military coup. But wait a minute, liberals and seculars of Pakistan are the champions of Democracy, then why are they supporting the military intervention in a democratic process just after one year of general election. The reason is simple. The hatred against the Islam and Islamic way of life. President Morsi belongs to a political party know as FJP (Freedom and Justice Party) which is the political wing of Ikhwan-ul-Muslimoon or Muslim Brotherhood is an organization working for Islamization in Egypt and Turkey since 1920. The liberals, secular and sufis are the enemy of Islam and they should be swatted like mosquitos
You forgot to mention that this mob also burnt between 30 and 52 churches to the ground and burnt bible bookshops.
Respect the elected democracy. Think for large.