CAIRO (AP) -- Egypt stumbled deeper into turmoil after a national holiday celebrating the military turned to mayhem, leaving 51 dead across the country and exposing the deep divisions plaguing the nation.
The high death toll in Sunday's clashes between security forces and Islamist protesters came as crowds from Egypt's two rival camps -- supporters of the ousted Islamist president, Mohammed Morsi, and backers of the military that deposed him -- poured into the streets and turned on each other.
Several neighborhoods of the capital, Cairo, resembled combat zones after street battles that raged for hours.
Morsi's supporters fired birdshot and threw firebombs at police who responded with gunshots and tear gas. Streets were left strewn with debris, and the air was thick with tear gas and smoke from burning fires, as the crack of gunfire rang out.
An Associated Press photographer saw nine bodies lying on the floor of a clinic in the Cairo district of Dokki, scene of some of the heaviest clashes. Most of the bodies had gunshot wounds to the head or chest.
It was the highest death toll in a single day in violence in Egypt since Aug. 14, when security forces raided two sit-in protest camps by Morsi'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 Mideast war with Israel.
On Sunday evening, a concert was aired live on state TV from a military-run Cairo stadium where pop stars from Egypt, Lebanon and the Gulf sang anthems to the army and dancers twirled on stage before a cheering crowd. Military chief Gen. Abdel-Fattah el-Sissi, other top brass and interim President Adly Mansour attended the show.
"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 chapter in the turmoil roiling Egypt since the ouster in February 2011 of autocrat Hosni Mubarak. 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, where crime and lawlessness have been rife.
Morsi was Egypt's first civilian and first freely elected president, succeeding four since the early 1950s who hailed from a military background. But after a year in office, Morsi was faced by massive protests demanding his ouster, accusing his Muslim Brotherhood of taking over power -- and on July 3, el-Sissi removed him.
The military is now back as the real source of power in Egypt, and state and independent media have been depicting it as the country's savior -- with growing calls for el-Sissi to run in the presidential election due early next year.
Sunday's holiday was an opportunity for Egypt's leaders to further fan the pro-military fervor sweeping the country since the coup. But the holiday was also a chance for Morsi's Muslim Brotherhood and its Islamist allies to show that they are surviving a fierce crackdown that has jailed more than 2,000 from their ranks since the coup.
Thousands of their backers held marches in various parts of Cairo, while at the same time crowds in support of the military took to the streets. In some cases, the two sides set upon each other, pelting each other with rocks and firebombs.
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 Morsi supporters were detained across the nation.
"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," a coalition grouping the Brotherhood and its allies said in a statement. It called for a rally in Cairo's central Tahrir Square on Friday.
The scenes of clashes contrasted sharply with Sunday's carnival-like mood in Tahrir, where thousands of supporters of the military waved Egyptian flags, blew whistles and touted posters of el-Sissi. Adding to the festivities, a military band played, and men spun in whirling dervish-style dances.
Demonstrators distributed petitions demanding that el-Sissi run for president.
"We cannot find a man who can run the country at this stage except for him (el-Sissi)," said aspiring actress Wafaa el-Sharqawi as she handed out the petition.
Soldiers barricaded entrances to Tahrir with barbed wire and armored personnel vehicles to guard it against possible attempts by Morsi's supporters to enter the square -- the epicenter of the anti-Mubarak uprising nearly three years ago.
Army helicopters flew low over the square, and some two dozen F-16 jet-fighters staged a celebratory flight over Cairo in late morning, ushering in the commemoration of the 1973 war.
At 2 p.m. -- the time the war began in 1973 -- church bells tolled and chants of "Allahu akbar," or "God is greatest," blared from the mosques.
But not all in the square were enthused about the military.
Moamen Mahmoud, a 23-year-old student, said he took part in the 2011 uprising and in subsequent protests against the military's direct rule of the country for some 17 months after Mubarak's fall.
"I came here today because I cannot miss an occasion like this, but sadly the revolutionaries are not here. I was here once chanting against military rule and now look at this. We forgot the principles of the revolution," he said.
The climax of the day's festivities was the extravaganza at a military stadium in eastern Cairo, attended by el-Sissi and kicked off with fireworks.
El-Sissi's predecessor, Field Marshal Hussein Tantawi, attended, his first public appearance since Morsi removed him in August 2012. Tantawi was Mubarak's defense minister for 20 years and took over the reins of the country when his mentor was ousted.