Egyptian police cleared Islamist protesters from a Cairo mosque on Saturday after a stand-off that included exchanges of fire, as the death toll from four days of violence surpassed 750.

Security forces dragged supporters of deposed president Mohamed Morsi from the Al-Fath mosque, passing through angry crowds who tried to beat the Islamists, calling them "terrorists".

The clashes came as the government said 173 people had been killed within 24 hours, bringing the country's death toll to more than 750 since Wednesday, when police cleared two camps of Morsi loyalists in the capital.

In the port city of Alexandria, Islamist marchers clashed with civilians during an evening protest, said the official MENA news agency.

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 Anti-Coup Alliance of Morsi supporters on Friday pledged daily demonstrations, but it was unclear if that call was heeded, with no reports of demonstrations in Cairo.

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.

-- 'Huge amount of self-control' --

Egypt's interim army-backed government has defended the crackdown, with presidential adviser Mustafa Hegazy saying forces had acted with "a huge amount of self-restraint and self-control".

The cabinet has also insisted the security services were acting to confront a "terrorist plot".

But international criticism poured in on Saturday, with German Foreign Minister Guido Westerwelle saying he and his Qatari counterpart were "deeply distressed by the ongoing and brutal violence in Egypt."

Westerwelle urged the two sides to resume dialogue, citing a "danger of civil war."

EU leaders have pledged a strong response to the violence, which the bloc's foreign policy chief Catherine Ashton has described as "shocking".

Late Saturday, British Foreign Secretary William Hague called his Egyptian counterpart to express London's "condemnation of all acts of violence, whether disproportionate use of force by the security forces or violent actions by some demonstrators."

Attacks on mosques and churches were "unacceptable," stressed Hague.

Elsewhere, thousands marched in Turkey against Morsi's ouster, and the Vatican said Pope Francis was following events with "mounting concern".

The pontiff was praying for the rival sides to "choose the path of dialogue and reconciliation," the Vatican said.

The United States has announced the cancellation of its biannual military exercise with Egypt, but stopped short of suspending $1.3 billion in annual aid.

The US embassy in Cairo said it would stay shut on Sunday, a working day in Egypt, citing the possibility of fresh demonstrations nearby.

Anti-American sentiment has risen in Egypt with Washington's criticism of the crackdown.

But the international response has been not uniformly critical. Saudi Arabia and Jordan said they backed Egypt's fight against "terrorism".

In neighbouring Libya, meanwhile, an explosive device went off in front of the Egyptian consulate in the eastern city of Benghazi, causing damage but no casualties, a security official said.