Tens of thousands of supporters of ousted president Mohamed Morsi gathered Friday vowing to keep fighting for his reinstatement, as rival rallies defending his overthrow underlined Egypt's bitter divisions.
The rallies come as Germany called for the release of Morsi, who is being held in a "safe place, for his safety" and has not yet been charged, according to the foreign ministry.
Holding Egyptian flags and Korans, protesters gathered outside the Rabaa al-Adawiya mosque in Cairo's Nasr City neighbourhood, chanting against the military and pledging allegiance to Morsi.
"We will continue to resist. We will stay one or two months, or even one or two years. We won't leave here until our president, Mohamed Morsi, comes back," influential Islamist leader Safwat Hegazi told the crowd.
Hegazi demanded the reinstatement of Egypt's first freely elected president, immediate parliamentary elections and a committee to oversee a plan for national reconciliation.
Morsi supporters set up a field kitchen to cook iftar -- the breaking of the Muslim fast during Ramadan -- for demonstrators.
Thousands also massed in support of the ousted president outside the University of Cairo, watched over by a heavy security presence.
Despite the turnouts and defiant mood, the gathering has been increasingly out of step with political developments as the interim authorities press ahead with forming a new government and Gulf states help support the faltering economy.
The Muslim Brotherhood, the influential Islamist group from which Morsi emerged, is now in tatters, its leadership detained, on the run or keeping a low profile following Morsi's July 3 overthrow by the military.
The holy month of Ramadan, usually a time of communal sharing and unity, has been marked by anxiety after deadly clashes.
Pro-Morsi protesters arrived from across the country to join hundreds already camped out at the Rabaa al-Adawiya mosque.
The anti-Morsi camp also called huge rallies after Friday in Tahrir Square and at the Ittihadiya presidential palace, with a mass iftar planned at sundown.
In Tahrir Square, several dozen demonstrators gathered under a scorching midday sun, adamant that their numbers would rise later.
"It is because of the heat and Ramadan, when we have a fast. During the day, people stay at home but this evening, people will come to Tahrir," Gamal, 48, told AFP.
The rival rallies have raised fears of more of the violence that has shaken Egypt since the army removed Morsi after millions of demonstrators demanded his resignation.
In the worst incident, clashes at an army building in Cairo on Monday killed 53 people, mostly Morsi supporters.
The Brotherhood accuses the army of "massacring" its supporters, while the army says soldiers were attacked by "terrorists" and armed protesters.
On Friday, gunmen in the Suez Canal city of Ismailia killed a police conscript and wounded an officer when they tried to stop a vehicle the armed group was travelling in, MENA reported on Friday.
The gunmen escaped, but security forces were tracking them down, Ismailiya police chief General Mohamed Eid told MENA.
The restive Sinai peninsula, home to Egypt's luxury Red Sea resorts, has been hit by a surge of violence, with militants killing a police officer in a rocket attack on a checkpoint early on Friday, officials said.
A Coptic Christian man was found decapitated on Thursday five days after being kidnapped, and on Wednesday, two people died in an attack on a security checkpoint in the Sinai.
Police are hunting Brotherhood chief Mohammed Badie and other senior leaders suspected of inciting violence, after arrest warrants were issued on Wednesday.
The public prosecutor has pressed charges against 200 of 650 people detained during Monday's violence.
A US State Department spokeswoman said the arrests were "not in line with the national reconciliation" the interim government and military say they want, adding that if they continued "it is hard to see how Egypt will move beyond this crisis".
The German foreign ministry spokesman said a "trusted institution" such as the International Committee of the Red Cross should be granted access to Morsi.
"We and our partners are of the opinion that any appearance of selective justice in Egypt must be avoided and there must be no political persecution," he said.
Adly Mansour, the military-appointed caretaker president, has set a timetable for elections by early next year.
But Morsi opponents and supporters alike have criticised the interim charter he issued on Monday to replace the Islamist-drafted constitution and steer a transition that the army itself has acknowledged will be "difficult".
Many fear a repetition of the mistakes of the last military-led transition, between Hosni Mubarak's ouster in 2011 and Morsi's election in June 2012.