All the protesters have now been taken out of the mosque, and many have been arrested, security forces say.
The confrontation at the al-Fath mosque continued for most of the day – with exchanges of gunfire between security forces and protesters.
Meanwhile interim PM Hazem Beblawi has proposed legally dissolving the Brotherhood.
The group supports the ousted President Mohamed Morsi, and wants him to be reinstated.
Despite being closely allied to Mohamed Morsi’s government, the Brotherhood has always technically been a banned organization – it was officially dissolved by Egypt’s military rulers in 1954 – but it recently registered itself as a non-governmental organization.
If it was legally dissolved, its property and assets could be seized.
It has called for daily demonstrations since a crackdown on its protest camps in Cairo on Wednesday left hundreds of people dead. Further clashes on Friday killed at least another 173 people.
Hazem Beblawi believes the protests are “terrorist acts”, according to his spokesman, Sharif Shawqi.
Sharif Shawqi told a televised news conference on Saturday that the Muslim Brotherhood’s return to power was impossible.
The stand-off began overnight, when the al-Fath mosque – which was being used as a makeshift clinic for the injured and morgue for the dead from clashes on Friday – turned instead into what correspondents describe as a fortress.
Brotherhood members barricading themselves inside, using anything at their disposal.
It turned into a scene of chaos. Tear gas was fired into the building, and witnesses saw live ammunition fired by both sides.
Al-Jazeera television called one woman inside the mosque on her mobile phone as the shooting began.
“Nobody here is safe, they are shooting inside the mosque,” she said, with loud firing heard in the background.
Egyptian police have been bringing some Mohamed Morsi supporters out of the building – leading some, dragging others – but are then having to protect them from angry mobs armed with bats and pieces of wood who are trying to attack them, correspondents say.
The authorities want to secure all buildings to avoid a repeat of Muslim Brotherhood supporters forming more camps, as they did after Mohamed Morsi was ousted.
Separately, the Egyptian authorities say they have arrested the brother of al-Qaeda chief Ayman al-Zawahiri.
Mohammed al-Zawahiri was detained at a checkpoint in Giza, near Cairo, because of his links to Mohamed Morsi, according to security officials.
Also on Saturday, the Muslim Brotherhood said on its Facebook page that Ammar Badie, the son of the movement’s spiritual leader, General Guide Mohamed Badie, was one of those killed during protests on Friday.
The Brotherhood said that Ammar Badie, 38, had died of a bullet wound in Ramses Square on Friday.
The secretary-general of the Brotherhood’s Freedom and Justice Party, Mohammed al-Beltagi, says his 17-year-old daughter, Asmaa, died in earlier protests.
Saturday’s violence comes after days of unrest in Cairo and elsewhere in Egypt.
The escalation in tensions began on Wednesday, when armored bulldozers moved into the two Cairo protest camps which had been occupied by pro-Morsi activists since he was ousted on 3 July.
The camps were eventually cleared, but not before at least 638 people were killed.
Mobs later carried out reprisal attacks on government buildings and police stations as well as churches belonging to the country’s Coptic Christian minority.
On Friday, hundreds of Muslim Brotherhood supporters gathered in Ramses Square for a “march of anger” about the bloodshed earlier in the week.
At least 173 people died across the country on Friday in clashes between the Brotherhood and the security forces.
ZKF6YA9v4QkImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…