Tens of thousands of supporters of Egypt's Muslim Brotherhood on Friday protested in Cairo in mass rallies called to reject the military's ouster of Islamist president Mohamed Morsi.
"May God bring Morsi back to power," and "May God end the rift between us and the army," the imam leading prayers told worshippers at the biggest rally outside Rabaa al-Adawiya mosque.
As thousands of flag-waving Morsi supporters also thronged to Cairo University, opponents of the deposed Islamist called on people to "mobilise in Egypt's squares" to "protect" the June 30 revolution.
Shortly before the rallies, around a dozen low-flying military jets screeched across Cairo, a day after they staged a parade leaving a trail of smoke in the shape of a heart in the sky.
The call for "peaceful protests" across Egypt came from the Brotherhood's newly formed National Alliance to Support Legitimacy, which it said were against "the military coup" and in support of Morsi.
The deposed leader, who has not been seen since Wednesday, had issued a defiant call for supporters to protect his elected "legitimacy", in a recorded speech aired hours after he was toppled.
With thousands of Morsi supporters camped outside the Rabaa al-Adawiya mosque, the call for demonstrations raised fears of fresh violence after days of bloodshed.
The military said it supported the right to peaceful protest, but warned against violence and acts of civil disobedience such as blocking roads.
Armed forces were on high alert in the restive Sinai peninsula, bolstering security after Islamist militants killed a soldier during a machinegun and rocket attack.
Clashes also broke out in the Nile Delta province of Sharqiya, hours after chief justice Adly Mansour, 67, was sworn in on Thursday as interim president until new elections.
Mansour called for unity in an interview broadcast on the eve of Friday's rallies.
"All I can say to the Egyptian people is to be one body. We had enough of division," he told Britain's Channel 4 television.
"The Muslim Brotherhood is part of the fabric of Egyptian society. They are one of its parties. They are invited to integrate into this nation and be part of it."
Prominent liberal leader Mohamed ElBaradei defended the military's intervention.
Signup to our newsletter and follow us on Facebook and Twitter!
"We asked the army to intervene because the other option was a civil war. We were between a rock and a hard place, and people need to understand that," the former UN nuclear watchdog chief told the BBC.
Ahead of the protests, the army warned Egyptians against resorting to "exceptional and autocratic measures against any political group".
"The armed forces believe that the forgiving nature and manners of the Egyptian people, and the eternal values of Islam, do not allow us to turn to revenge and gloating," added the army, even as security forces rounded up top Muslim Brotherhood officials.
The Islamists accuse the military of conducting a brazen coup against Morsi, Egypt's first democratically elected but divisive president, following massive protests calling for his ouster.
Army chief General Abdel Fattah al-Sisi announced Morsi's overthrow on Wednesday night, citing his inability to end a deepening political crisis, as dozens of armoured personnel carriers streamed onto the streets of the capital.
Military police have since arrested Brotherhood supreme leader Mohammed Badie "for inciting the killing of protesters", a security official told AFP.
Former supreme guide Mahdi Akef was also arrested, state television reported.
Morsi himself was "preventively detained" by the military, a senior officer told AFP hours after his overthrow, suggesting he might face trial.
A judicial source said the prosecution would on Monday begin questioning Brotherhood members, including Morsi, for "insulting the judiciary". Thirty-five of them have been banned from travel.
But controversial public prosecutor Abdel Meguid Mahmud said Friday he was to resign, days after being reinstated, citing possible conflicts of interest in future prosecutions.
Morsi's supporters argue the president was confronted at every turn with a hostile bureaucracy left over by former strongman Hosni Mubarak, overthrown in the country's 2011 uprising.
His rule was marked by a spiralling economic crisis, shortages of fuel and often deadly opposition protests.
US President Barack Obama said he was "deeply concerned" over the developments, but refrained from calling the military intervention a coup.
In May, Washington approved $1.3 billion in military aid to Egypt. That was now under review, said Obama, as he called for a swift return to democratic rule.
The African Union suspended Egypt from the bloc in response to Morsi's ouster, after governments across the Middle East welcomed the military's intervention in varying degrees, with war-hit Syria calling it a "great achievement".