Egyptian security forces stormed a Cairo mosque Saturday following a heavy exchange of gunfire with armed men shooting down from a minaret, rounding up hundreds of supporters of the country's ousted president who had sought refuge there overnight after violent clashes killed 173 people.

Security officials said officers raided the al-Fath mosque on Ramses Square out of fears the Muslim Brotherhood, the group of deposed president Mohammed Morsi, again planned to set up a sit-in similar to those broken up Wednesday in assaults that killed hundreds of people.

The Egyptian government meanwhile announced it had begun deliberations on whether to ban the Brotherhood, a long-outlawed Islamist organization that swept to power in the country's first democratic elections a year ago.

si-cairo-injured-300-ap-04869592

Supporters of President Mohammed Morsi carry a wounded man during clashes with security forces in Ramses Square, downtown Cairo on Friday. (Hassan Ammar/Associated Press)

Such a ban — which authorities say is rooted in the group's use of violence — would be a repeat of the decades-long power struggle between the state and the Brotherhood.

For more than a month since the July 3 military overthrow of Morsi, Brotherhood members and supporters have attacked and torched scores of police stations and churches, in retaliation. Shops and houses of Christians have also been targeted.

The assault on the al-Fath Mosque began overnight Friday, when pro-Morsi protesters and armed men fled into the worship centre to avoid angry vigilantes and arrest. They piled furniture in the mosque's entrance to block authorities and enraged anti-Morsi protesters trying to reach them.

The mosque served as a field hospital and an open-air morgue as a Brotherhood-called day of protests descended into violence. By daybreak Saturday, security forces and armored personnel carriers surrounded the mosque and sealed off the area with barbed wire, and it appeared that military-led negotiations might defuse the standoff.

Then gunmen took over a mosque minaret and opened fire on the security forces below, the state-run MENA news agency said. The crowd around the mosque panicked as soldiers opened fire with assault rifles, the chaos broadcast live on local television channels.

A Muslim cleric, Sheik Abdel-Hafiz el-Maslami, told The Associated Press that people were afraid to leave the mosque out of fear of detention or being assaulted by the crowd outside. He said there were armed men inside the mosque at one point but protesters had forced them out.

Several security officials told The Associated Press that ending the standoff at the mosque was essential after receiving information that the group planned to turn it into a new sit-in protest camp. They spoke on condition of anonymity, in line with regulations.

Snipers, bulldozers used to break up protests

On Wednesday, riot police, military helicopters, snipers and bulldozers broke up two sit-in protests by Morsi supporters, leaving more than 600 people dead and thousands injured. That sparked days of violence that killed 173 people and injured 1,330 people on Friday alone, when the Brotherhood called for protests during a "Day of Rage," Cabinet spokesman Sherif Shawki said..

Among those who died Friday was Ammar Badie, a son of Brotherhood spiritual leader Mohammed Badie, the group's political arm said in a statement

Brother of al-Qaeda chief arrested

Egyptian authorities arrested the brother of al-Qaeda chief Ayman al-Zawahri, a security official said Saturday.

He said Mohammed al-Zawahri, leader of the ultraconservative Jihadi Salafist group, was detained at a checkpoint in Giza, the city across the Nile from Cairo.

Mohammed al-Zawahri's group espouses a hard-line ideology but was not clandestine prior to Egypt's July 3 coup. He was allied with ousted President Mohammed Morsi, an Islamist, whose supporters are now taking to the streets to protest the killings of its supporters in a security crackdown last week.

Authorities said earlier that al-Zawahri had commanded insurgents in Sinai Peninsula.

-Associated Press

Prime Minister Hazem el-Beblawi, who leads the military-backed government, later told journalists that authorities had no choice but to use force in the wake of recent violence.

"I feel sorry for valuable blood shed," el-Beblawi said. However, he cautioned that there will be no "reconciliation with those whose hands are stained with blood or those who hold weapons against the country's institutions."

Signaling the Brotherhood's precarious political position, Shawki said the government was considering ordering the group be disbanded. The spokesman said the prime minister had assigned the Ministry of Social Solidarity to study the legal possibilities of dissolving the group. He didn't elaborate.

Muslim Brotherhood in the spotlight

The Muslim Brotherhood, founded in 1928, came to power a year ago when Morsi was elected in the country's first free presidential elections, following the overthrow of autocrat Hosni Mubarak in a popular uprising in 2011.

Disbanding the group, experts say, would mean allowing security forces to have a zero-tolerance policy in dealing with the Brotherhood's street protests, as well as going after its funding sources.

The military-backed government has declared a state of emergency and imposed dusk-to-dawn curfew since Wednesday, empowering army troops to act as a law enforcement force. Top Brotherhood leaders, including Morsi, remain held on a variety of charges, including inciting violence.

Since Morsi was deposed in the military coup, the Brotherhood stepped up its confrontation with the new leadership, rallying thousands and vowing not to leave until Morsi is reinstated.

After security forces broke up the latest protest camps, Islamist supporters stormed and torched churches and police stations. In response, authorities gave the OK for Egypt's security personnel to use deadly force against those attacking vital government institutions.

On Saturday, Egypt's Interior Ministry said in a statement that a total of 1,004 Brotherhood members were detained in raids across the country and that weapons, bombs and ammunition were confiscated from the detainees.

Also Saturday, authorities arrested the brother of al-Qaida chief Ayman al-Zawahri, a security official said. Mohammed al-Zawahri, leader of the ultraconservative Jihadi Salafist group, was detained at a checkpoint in Giza, the city across the Nile from Cairo, the official said.

With files from CBC News