An Egyptian man cries outside a morgue after carrying the corpse of his brother killed near the Republican Guard building in Cairo, Egypt, Monday, July 8, 2013. Egyptian soldiers and police opened fire on supporters of the ousted president early Monday in violence that left dozens of people killed, including one officer, outside a military building in Cairo where demonstrators had been holding a sit-in, government officials and witnesses said. A man displays a bloodied shirt of ousted President Mohamed Morsi's supporter outside a local hospital in Cairo. Egypt, Monday, July 8, 2013. Egyptian soldiers and police opened fire on supporters of the ousted president early Monday in violence that left dozens of people killed, including one officer, outside a military building in Cairo where demonstrators had been holding a sit-in, government officials and witnesses said. " . (AP Photo/Nasser Shiyoukhi) A wounded supporter of deposed Egypt's President Mohammed Morsi lies at a local hospital in Cairo. AP Photo/Nasser Shiyoukhi The body of a supporter for Egypt's ousted President Mohammed Morsi lies in an ambulance in Cairo, Egypt, Monday, July 8, 2013. A wounded supporter of deposed Egypt's President Mohammed Morsi is treated at a local hospital in Cairo. CAIRO (AP) - Egyptian soldiers and police clashed with Islamists protesting the military's ouster of the president in bloodshed that left at least 51 protesters and three members of the security forces dead, officials and witnesses said, and plunged the divided country deeper into crisis with calls by the Muslim Brotherhood's political party for all-out rebellion against the army. The carnage outside the Republican Guard building in Cairo - where toppled President Mohammed Morsi was first held last week - marked the single biggest death toll since massive protests forced Morsi's government from power and brought in an interim civilian administration. Even before all the bodies were counted, there were conflicting accounts on how the violence began. Morsi's backers said the troops attacked their encampment without provocation just after dawn prayers. The military said it came under a heavy assault first by gunmen who killed an army officer and two policemen. More than 400 were wounded in the mayhem. The violence is almost certain to draw sharper battle lines between Morsi's Muslim Brotherhood, who say the military has carried out a coup against democracy, and their opponents, who claim Morsi squandered his 2012 election victory and was wrecking democracy by bolstering his and the Brotherhood's grip on the state. Egypt's top Muslim cleric warned of "civil war" and said he was going into seclusion as a show of protest to both sides until the violence ends. Sheik Ahmed el-Tayeb, head of Al-Azhar Mosque, said he had "no choice" but to seclude himself at home "until everyone shoulders his responsibility to stop the bloodshed instead of dragging the country into civil war." Soon after the attack, the Al-Nour party, an ultraconservative Islamist party that had been talking to the new government about participating in the political process, announced it was withdrawing its support for the transition plan in response to the "massacre." The military, which removed Morsi on Wednesday after mass protests against him, now may face pressures to impose stricter security measures to try to keep unrest from spilling out of control. It will also have to produce compelling evidence to support its version of events or otherwise suffer what is already shaping to be a Brotherhood media blitz to portray the military as a brutal institution with little regard for human life or democratic values. The escalating chaos will also further complicate Egypt's relations with Washington and other Western allies, which had supported Morsi as the country's first freely elected leader and now are reassessing policies toward the military-backed group that forced him out. In a move that is likely to further inflame the situation, the Freedom and Justice party, the Muslim Brotherhood's political arm, called on Egyptians to rise up against the army. Morsi has been a longtime leader of the Brotherhood. The party also called on the international community to stop what it called the massacres in Egypt and accused the military of pushing Egypt toward civil war, warning the country was in danger of becoming a "new Syria." "The only thing the military understands is force and they are trying to force people into submission," said Marwan Mosaad, speaking at a field hospital run by Morsi's supporters. It is a struggle of wills and no one can predict anything. Pro-reform leader Mohamed ElBaradei also condemned the violence and called for an investigation, writing on Twitter that "peaceful transition the only way." The morning's violence left at least 51 protesters dead and 435 wounded, most from live ammunition and birdshot, emergency services chief Mohammed Sultan, according to the state news agency. Two policemen and one soldier were also killed, according to the military. The Morsi supporters had been camped out for days at the site in tents around a mosque near the Republican Guard complex, where Morsi was initially held but was later moved to an undisclosed Defense Ministry facility. Spokesmen for the military and police gave a nationally televised press conference to give their version of the morning's bloodshed. Army Col. Ahmed Mohammed Ali said police and troops guarding the Republican Guard complex came under "heavy gunfire" at around 4 a.m. and attackers on rooftops opened fire with guns and molotov cocktails. Along with the soldier and two policemen, 42 in the security forces were wounded, eight critically, he said. He underlined that the troops had the right to defend the installation and that the protest "was no longer peaceful." He pointed out that suspected Islamists have carried out coordinated armed attacks on several military facilities in recent days in the Sinai Peninsula. One witness, university student Mirna el-Helbawi, also said gunmen loyal to Morsi opened fire first, including from the roof of a nearby mosque. El-Helbawi, 21, lives in an apartment overlooking the scene. Supporters of Morsi, however, said the security forces fired on hundreds of protesters, including women and children, at the sit-in encampment as they performed early morning prayers. "They opened fire with live ammunition and lobbed tear gas," said Al-Shaimaa Younes, who was at the sit-in. A Muslim Brotherhood spokesman, Mourad Ali, denied any Morsi supporters fired first andsaid the military had warned protesters it will break up the sit-in. Abu Ubaida Mahmoud, a religion student from Al-Azhar University, said he had been praying when the sit-in's security teams began banging on metal barricades in warning. He then saw troops coming out of the Guard complex. "The number of troops that came from inside was stunning," said Mahmoud, who was wounded in the hand. The troops opened fire and "I saw injuries in the chest, the neck, the head and the arm," he said. A guard at a nearby bank said security forces first moved in on the encampment firing tear gas, then he heard gunfire, though who couldn't tell who was firing. He said that over recent days the Morsi protesters had imposed their control on the surrounding district and were clearly armed. At field hospitals set up Morsi supporters, at least six dead bodies were shown laid out on the ground, some with severe wounds, in video aired by Al-Jazeera TV. The bodies had been draped with an Egyptian flag and pictures of Morsi. Pools of blood covered the floor and doctors struggled to deal with gaping wounds among some of the hundreds injured. Egyptian state TV showed images provided by the military of the scene of the sit-in amid the melee. Dozens of protesters were shown pelting troops with rocks and setting tires on fire. Soldiers in riot gear and carrying shields formed lines a few meters (yards) away. A fire raged from an apartment in a building overlooking the clashes. Images showed men throwing spears from atop nearby building rooftops. Other protesters were lobbing fire bombs at the troops. It was not clear at what stage in the melee the footage was filmed. Security officers were showing cameras bullet casings, and troops were carrying injured colleagues. By the afternoon, troops moved in and cleared the sit-in site and blockades on the road. The site of the early morning clashes, a strip of road about a kilometer long (about half a mile), was covered with rocks, shattered glass, shoes, clothes, prayer rugs and personal photographs. A big Morsi banner remained hoisted in front of the Republican Guards' building. On the ground below it, graffiti read: "Where are our votes?" Interim President Adly Mansour called for restraint and ordered a judicial inquiry into the killings. Significantly, the statement from his office echoed the military's version of events, noting that the killings followed an attempt to storm the Republican Guard's headquarters. Prosecutors in Cairo also ordered the closure of the Brotherhood party's headquarters amid investigations into a cache of weapons found there, according to the official Middle East News Agency. El-Tayeb, the sheik of Al-Azhar also called for an independent investigation into the shooting and for the release of all those detained in recent days, referring to five Brotherhood leaders detained since Morsi's fall. Morsi supporters have been holding rallies and a sit-in outside the Republican Guard building and elsewhere around Cairo since the military deposed Morsi on Wednesday. The military chief replaced Morsi with an interim president until presidential elections are held. Al-Nour party spokesman Nader Bakkar said on his Twitter account his party is withdrawing its support for the transition plan in response to the "massacre." Morsi's supporters refuse to recognize the change in leadership and insist Morsi be reinstated, and have vowed to continue their sit-ins outside the Republican Guard building as well as at a nearby mosque. They say the former president lost his legitimacy by mismanaging the country and not ruling democratically, leading to a mass revolt that began June 30, the first anniversary of Morsi's assumption of power. Associated Press correspondent Paul Schemm contributed to this report.