Security forces on Saturday dragged Islamist supporters of deposed president Mohamed Morsi from the Al-Fath mosque, passing through angry crowds who called them "terrorists" and tried to beat them.
The interior ministry said 385 people inside the mosque had been arrested.
The clashes came as the government said the country's death toll had risen to more than 750 since Wednesday, when police cleared two camps of Morsi loyalists in the capital.
A statement by the Anti-Coup Alliance said several marches would take place in Cairo on Sunday afternoon, continuing the daily campaign of protests in defiance of an intensifying crackdown.
According to an AFP tally, more than 1,000 people have been killed since mass demonstrations at the end of June against the unpopular rule of Morsi, accused of concentrating political power in the hands of his Islamist backers and of failing to address economic woes.
He was deposed by the military on July 3 in what his supporters say was an armed "coup d'etat" that deepened splits in an already highly divided society.
Meanwhile, international criticism of the bloodshed mounted, with Germany and Qatar jointly condemning the "brutal violence" and United Nations boss Ban Ki-moon urging "maximum restraint" and "de-escalation" at what he termed a "dangerous moment" for Egypt.
The siege of the Al-Fath mosque in Ramses Square began on Friday, with security forces surrounding the building where Islamists were sheltering and trying to convince them to leave.
The Islamists had lined up the bodies of dozens of protesters who had been killed on Friday inside the mosque-turned-morgue.
By Saturday afternoon, the situation turned violent, with an AFP reporter at the scene saying gunmen inside the mosque were trading fire with police outside.
Police eventually dragged people from inside the mosque, firing in the air to hold back residents who tried to attack the Islamists with sticks and iron bars.
Both outside the mosque and in other parts of Cairo, residents targeted those suspected of being Islamists, often for no more than wearing a beard or a veil.
The tense siege came at the end of "Friday of anger" demonstrations called by Morsi's supporters that left at least 173 people dead across the country, including 95 in the capital and 25 in Alexandria.
Among those killed on Friday was a son of Mohamed Badie, chief of Morsi's Muslim Brotherhood movement.
The interior ministry said it had arrested 1,004 Brotherhood "elements" during the unrest, and on Saturday security sources said the brother of Al-Qaeda chief Ayman al-Zawahiri had been detained.
Security sources also said one soldier was killed in northern Sinai where militants have launched daily attacks against security forces.