A national holiday in Egypt celebrating the military descended into carnage, leaving 51 dead across the country.
Clashes erupted as crowds from the two rival camps - supporters of ousted Islamist president Mohammed Mursi, and backers of the military that deposed him - poured into the streets and turned on each other.
Several neighbourhoods in Cairo resembled combat zones after street battles that raged for several hours.
As the security forces stepped in, Mursi's supporters fired birdshot and threw firebombs at them. They responded with gunfire and tear gas.
Streets were left strewn with debris and the air was thick with tear gas and smoke.
It was the highest death toll in a single day of violence in Egypt since August 14, when security forces stormed two protest camps set up by Mursi's supporters in Cairo, killing hundreds.
Even as fighting continued in the streets, the military went ahead with lavish celebrations for the holiday marking the 40th anniversary of the start of the 1973 war with Israel. On Sunday evening, a concert was aired live on state television from a military-run stadium in Cairo.
Military chief General Abdel-Fattah el-Sissi and acting President Adly Mansour attended.
"There are those who think the military can be broken," el-Sissi said in an address at the concert. "You see the Pyramids? The military is like the pyramids, because the Egyptian people are on its side."
The street battles were the latest grim chapter of turmoil in Egypt since February 2011, when Hosni Mubarak was ousted after ruling for 30 years.
The new violence is certain to set back efforts by the interim, military-backed government to revive the economy - especially the vital tourism sector - and bring order to the streets of Cairo.
The Health Ministry reported 51 people killed nationwide - at least 40 of them in Cairo - and more than 240 injured.
The Interior Ministry, which is in charge of the police, said 423 Mursi supporters were detained across the nation.
A coalition grouping the Muslim Brotherhood and its allies said in a statement: "At the time when festivities are arranged for one section of the population, they call on Egyptians to dance on the dead bodies of their compatriots who oppose the coup."
It called for a rally in Cairo's Tahrir Square on Friday. The bloody scenes of the clashes contrasted sharply with Sunday's carnival-like mood in Tahrir, where thousands of supporters of the military waved Egyptian flags, blew whistles and waved posters of el-Sissi.
Soldiers barricaded entrances to Tahrir with barbed wire and armoured personnel vehicles to guard it against attempts by Mursi's supporters to enter.
Mursi was Egypt's first civilian and first freely elected president.
But after a year in office, he was faced by massive protests demanding his removal, accusing his Muslim Brotherhood of taking over power.
On July 3, he was removed by el-Sissi, who is now being urged to run in the presidential election due early next year.