CAIRO -- CAIRO (AP) — Clashes erupted on Sunday across much of Egypt between security forces and supporters of the ousted president, leaving 44 killed, as rival crowds of supporters of the military and backers of the Islamist Mohammed Morsi it deposed poured into streets around the country to mark a major holiday.

The capital, Cairo, saw multiple scenes of mayhem as street battles raged for hours in some neighborhoods, with Morsi supporters firing birdshot and throwing firebombs at police who responded with gunshots and tear gas.

In some cases, pro-military crowds set upon supporters of the former president, with the two sides pelting each other with rocks. By late evening, several parts of the city resembled combat zones, with fires burning, black smoke rising and the crack of gunfire piercing the air, thick with tear gas. Streets were strewn with debris.

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.

The Health Ministry reported 40 people killed in Cairo and four others killed in provinces south of cairo, with more than 240 people injured. The Interior Ministry, which is in charge of the police, said 423 Morsi supporters were detained across the nation.

The clashes took place on the 40th anniversary of the start of the 1973 Mideast war with Israel, a holiday the military-backed government had wanted to use to pay tribute to the armed forces, whose chief ousted Morsi in a popularly supported coup on July 3.

The clashes were the last chapter in the turmoil roiling the country since the ouster in February 2011 of longtime ruler Hosni Mubarak and are certain to set back efforts by the 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.

The scene of the fighting contrasted sharply with a carnival-like mood in Cairo's central Tahrir Square, where thousands of supporters of the military waved Egyptian flags, blew whistles and touted posters of army chief Gen. Abdel-Fattah el-Sissi. Adding to the festivities, a military band in green jackets and off-white pants played, and men spun in whirling dervish-style dances.

Earlier in the day, soldiers had barricaded entrances to central Tahrir Square with barbed wire and armored personnel vehicles. Metal detectors were installed at the entrances and demonstrators pouring into the square were searched by troops.

Late on Sunday, el-Sissi and interim President Adly Mansour attended a fireworks extravaganza at a military-owned stadium in the eastern part of Cairo.

El-Sissi's predecessor, Field Marshal Hussein Tantawi, was among those attending the ceremony, making his first public appearance since Morsi removed him and his chief of staff, Sami Anan, in August last year. Tantawi served Hosni Mubarak as defense minister for 20 years and took over the reins of the country when his mentor was ousted in a 2011 uprising.

Anan, who has presidential ambitions, was not present.

Also on HuffPost:

Loading Slideshow...
  • Pro-military crowds and supporters of the former president, Mohammed Morsi, pelt each other with rocks, fireworks and firebombs in street battles near Ramsis Square, Cairo, Egypt, Sunday, Oct. 6, 2013. (AP Photo/Emad Abdul Rahman)

  • A supporter of ousted Egyptian President Mohammed Morsi prays in the street, left, while another holds a poster with a gesture of an open palm with four raised fingers that has became a symbol for the Rabaah al-Adawiya mosque where hundreds of Muslim Brotherhood supporters were killed by security forces in August, near Ramsis Square, Cairo, Egypt. (AP Photo/Sabry Khaled, El-Shorouk Newspaper)

  • An Egyptian mourns a loved one, who was a supporter of Egypt's ousted President Mohammed Morsi, killed during clashes with security forces in Cairo, Egypt, Sunday, Oct. 6, 2013. (AP Photo/Hassan Ammar)

  • An Egyptian Army officer tries to prevent a supporter of Defense Minister Gen. Abdel-Fattah el-Sissi from clashing with supporters of ousted President Mohammed Morsi near Ramsis Square, Cairo, Egypt, Sunday, Oct. 6, 2013. (AP Photo/Sabry Khaled, El-Shorouk Newspaper)

  • Egyptians mourn a loved one, who was a supporter of Egypt's ousted President Mohammed Morsi, killed during clashes with security forces, in a clinic in Cairo, Egypt, Sunday, Oct. 6, 2013. (AP Photo/Hassan Ammar)

  • Supporters of Egypt's ousted President Mohammed Morsi mourn relatives killed during clashes with security forces in Cairo, Egypt, Sunday, Oct. 6, 2013. Deadly clashes left tens dead and scores injured as rival crowds of supporters of the military and backers of Morsi poured into streets around the country Sunday, as a holiday marking the anniversary of the last war with Israel turned into a showdown between the country's two rival camps. (AP Photo/Hassan Ammar)

  • Egyptians try to comfort a man as he mourns a relative, who was a supporter of ousted President Mohammed Morsi, killed during clashes with security forces in Cairo, Egypt, Sunday, Oct. 6, 2013. Deadly clashes left tens dead and scores injured as rival crowds of supporters of the military and backers of Morsi poured into streets around the country Sunday, as a holiday marking the anniversary of the last war with Israel turned into a showdown between the country's two rival camps. (AP Photo/Hassan Ammar)

  • A man identifies the body of a supporter of Egypt's ousted President Mohammed Morsi who was killed during clashes with security forces in Cairo, Egypt, Sunday, Oct. 6, 2013. Deadly clashes took place as rival crowds of supporters of the military and backers of Morsi poured into streets around the country Sunday, as a holiday marking the anniversary of the last war with Israel turned into a showdown between the country's two rival camps. (AP Photo/Hassan Ammar)

  • A supporter of Egypt's ousted President Mohammed Morsi grieves for a relative killed during clashes with security forces in Cairo, Egypt, Sunday, Oct. 6, 2013. (AP Photo/Hassan Ammar)

  • Egyptians chant pro-army slogans and hold posters of Egyptian Defense Minister Gen. Abdel-Fattah el-Sissi, as they celebrate the 6th of October, 1973 war anniversary, in Tahrir Square, Cairo, Egypt, Sunday, Oct. 6, 2013. (AP Photo/Khalil Hamra)

  • Egyptian military helicopters fly overhead as army soldiers stand guard at an entrance to Tahrir Square, in Cairo, Egypt, Sunday, Oct. 6, 2013. Deadly clashes took place as rival crowds of supporters of the military and backers of ousted President Mohammed Morsi poured into streets around the country Sunday, as a holiday marking the anniversary of the last war with Israel turned into a showdown between the country's two rival camps. (AP Photo/Khalil Hamra)

  • An Egyptian army soldier greets a child dressed in a military costume as they guard an entrance to Tahrir Square, in Cairo, Egypt, Sunday, Oct. 6, 2013. (AP Photo/Khalil Hamra)

  • Egyptians hold posters of Egyptian Defense Minister Gen. Abdel-Fattah el-Sissi, left, and former president Gamal Abdel-Nasser with an unknown victim of the Jan. 25th revolution, as they celebrate the 6th of October 1973 war anniversary, in Tahrir Square, in Cairo, Egypt, Sunday, Oct. 6, 2013. (AP Photo/Khalil Hamra)

  • Egyptians chant pro-army slogans and hold posters of Egyptian Defense Minister Gen. Abdel-Fattah el-Sissi, as they celebrate the 6th of October war anniversary, in Tahrir Square, in Cairo, Egypt, Sunday, Oct. 6, 2013. Deadly clashes took place as rival crowds of supporters of the military and backers of ousted President Mohammed Morsi poured into streets around the country Sunday, as a holiday marking the anniversary of the last war with Israel turned into a showdown between the country's two rival camps. (AP Photo/Khalil Hamra)

  • An Egyptian riot policeman moves into position during clashes with supporters of ousted President Mohammed Morsi, in Cairo, Egypt, Sunday, Oct. 6, 2013. Rival crowds of supporters of Egypt's military and backers of the Islamist president deposed by the army poured into streets around the country Sunday, as a holiday marking the anniversary of the last war with Israel turned into a showdown between the country's two camps. (AP Photo/Hassan Ammar)

  • Supporters and opponents of Egypt's ousted Islamist President Mohammed Morsi clash in Cairo, Egypt, Sunday, Oct. 6, 2013. Rival crowds of supporters of Egypt's military and backers of the Islamist president deposed by the army poured into streets around the country Sunday, as a holiday marking the anniversary of the last war with Israel turned into a showdown between the country's two camps. (AP Photo/Hassan Ammar)

  • Egyptian riot police move into position during clashes with supporters of ousted President Mohammed Morsi, in Cairo, Egypt, Sunday, Oct. 6, 2013. Rival crowds of supporters of Egypt's military and backers of the Islamist president deposed by the army poured into streets around the country Sunday, as a holiday marking the anniversary of the last war with Israel turned into a showdown between the country's two camps. (AP Photo/Hassan Ammar)

  • Supporters and opponents of Egypt's ousted Islamist President Mohammed Morsi clash in Cairo, Egypt, Sunday, Oct. 6, 2013. Rival crowds of supporters of Egypt's military and backers of the Islamist president deposed by the army poured into streets around the country Sunday, as a holiday marking the anniversary of the last war with Israel turned into a showdown between the country's two camps. (AP Photo/Hassan Ammar)

  • Supporters and opponents of Egypt's ousted Islamist President Mohammed Morsi clash in Cairo, Egypt, Sunday, Oct. 6, 2013. Rival crowds of supporters of Egypt's military and backers of the Islamist president deposed by the army poured into streets around the country Sunday, as a holiday marking the anniversary of the last war with Israel turned into a showdown between the country's two camps. (AP Photo/Hassan Ammar)