Egypt army warns of crackdown on 'black violence'
The Egyptian army has warned it will use force against any group resorting to violence during rival rallies planned for Friday.
Army chief Gen Abdel Fattah al-Sisi has called on people to take to the streets to give the military a mandate to confront "terrorism".
Supporters of ousted President Mohammed Morsi are also expected to demonstrate to demand his reinstatement.
Mr Morsi was detained on 3 July. The UN chief has called for his release.
In a statement on Thursday, Ban Ki-moon called on the Egyptian military to free Mr Morsi and other members of the Muslim Brotherhood "or have their cases reviewed transparently without delay".
Mr Morsi - Egypt's first democratically elected president - was ousted by the army after mass protests against him on the anniversary of his election.
On Thursday, military spokesman Col Ahmed Mohammed Ali said the army was respectful of peaceful protests, but said that violence or terrorism would be "dealt with decisively and with force".
A statement on a Facebook page affiliated to the military said: "We reaffirm that the Egyptian armed forces... never uses its weapons against its own people but will do so against violence and black terrorism which has no faith and no nation."
Since Mr Morsi was ousted dozens of people have died in clashes between supporters and opponents of the Islamist leader. Militants have also staged deadly attacks in the Sinai peninsula.
In his call for demonstrations on Wednesday, Gen Sisi said he was not calling for unrest. Military spokesmen have insisted that the army is not seeking to target any particular group.
The Tamarod movement that organised the protests which preceded Mr Morsi's removal has urged its supporters to take part in Friday's rallies.
"We call on all of the great Egyptian people to gather in the squares on Friday to officially demand that Mohammed Morsi be put on trial and to support the Egyptian armed forces in its coming war on terrorism," it said.
The Muslim Brotherhood, which backs Mr Morsi, said Gen Sisi was "calling for civil war".
The Muslim Brotherhood's spiritual leader Mohammed Badie said the army's removal of Mr Morsi was equivalent to destroying one of Islam's holiest sites, the Kaaba in Mecca.
"I swear by God that what Sisi did in Egypt is more criminal than if he had carried an axe and demolished the holy Kaaba stone by stone," Mr Badie said.
Some analysts say the military could be preparing to move against sit-ins by Mr Morsi's supporters, including one in front of the Rabaa al-Adawiya mosque in a Cairo suburb.
Mohammed Morsi narrowly won the presidential election in June 2012 to become Egypt's first democratically elected president, but his opponents accused him of trying to impose an Islamist agenda on the country.
Interim President Adly Mansour has set out a "roadmap" towards a revision of the constitution introduced by Mr Morsi and for fresh elections in early 2014, but this has has been rejected by the Muslim Brotherhood.