CAIRO, Egypt (CNN) — More than 40 people were killed Monday when Egyptian security forces clashed with supporters of deposed President Mohamed Morsy and the Muslim Brotherhood, the government said.
Witnesses said the military and police fired when protesters had taken a break from holding a vigil at the Republican Guard headquarters to say their morning prayers.
Morsy was reportedly detained there after his arrest Wednesday.
The Health Ministry put the number of fatalities at 42 and said 322 others were wounded.
But the military said it was forced to fire when an "armed terrorist group" tried to raid the headquarters.
An Interior Ministry statement said two security force members -- a lieutenant and a recruit -- were shot and killed.
The Monday morning violence further deepened a crisis in the country -- the Arab world's most populous -- where Morsy supporters have been squaring off daily with security forces after his ouster in a military coup last week.
CNN counted at least eight bullet-riddled bodies and up to 40 wounded at the chaotic emergency facility in the Egyptian capital, down the street from the site of the shooting.
The upper bodies of the victims appeared to be peppered with shotgun pellets and bullet wounds.
Doctors tended to the victims, performing surgeries in many cases before shipping them out to other facilities.
Egyptian flags were draped over those who did not survive.
Reacting to the shooting at the Republican Guard headquarters, the Al-Nour party -- which supported Morsy's ouster -- withdrew from all talks about forming an interim government.
"We will not remain silent on the Republican Guard massacre," party spokesman Nader Bakkar said.
Interim President Adly Mansour ordered the formation of a committee to investigate the violence at the Republican Guard headquarters, according to state-run Nile TV.
Elsewhere, in eastern Cairo, Morsy supporters kidnapped two soldiers, state radio reported.
Before the outbreak of violence Monday, than 30 people had died and 1,400 had suffered injuries since the coup.
Egypt's military declared over the weekend it was stepping up security efforts for the demonstrations.
"We also warn against any provocation or clashes with the peaceful demonstrators," the statement said. "Anyone who violates these instructions will be dealt with firmly in accordance with the law."
Morsy has long been affiliated with the Freedom and Justice Party, Muslim Brotherhood's political movement.
The group promised its protests would be peaceful and accused authorities of planning to send fake bearded men into Cairo's Tahrir Square to incite violence.
"This is so they can claim that the supporters of the elected-president and the Islamic groups are attacking the peaceful demonstrators. ... We warn those who play with fire that any sectarian incitement at this critical time will not be in the interests of anyone in our beloved Egypt," the party said in a statement on Facebook.
Human Rights Watch, which monitors and defends human rights around the world, called for Egypt's military and political leaders to do more to stop the bloodshed.
"All sides need to tell their followers to refrain from actions likely to lead to violence and loss of life," Joe Stork, deputy Middle East and North Africa director at Human Rights Watch, said in a statement. "At the same time, the security forces need to show that they can act professionally and effectively to stop the violence without resorting to unlawful lethal force."
The latest violence came only hours after state television reported that Egypt's interim president has nominated Mohamed El Baradei as vice president and Ziad Bahaa el Din as prime minister.
Mansour, the interim president, will need to get political consensus before they are appointed.
Presidential spokesman Ahmed Almoslemani stressed on Nile TV there is no specific deadline of when the new government will be announced.
Nile TV had previously reported that he said an announcement would be made within 24 hours.
Earlier, El Baradei's name had been floated for the office of prime minister, but a swearing-in announced for Saturday didn't happen.
Mahmoud Badr, spokesman for the rebel movement Tamarod, told Egypt's OTV on Sunday that the presidency had tapped El Baradei to form the new government but then retracted the offer after objections from the conservative al-Nour party.
El Baradei is well-known as the former head of the U.N. atomic watchdog agency, the International Atomic Energy Agency, and a Nobel Prize Peace winner.
He was to appear Sunday in an interview with CNN's Fareed Zakaria but canceled it along with all other media interviews, his office said.
In the lawless desert of the Sinai, where al Qaeda affiliates have long had a foothold, violent attacks erupted after Morsy's removal.
It is unclear whether the attacks were a reaction to events in Cairo.
On Sunday, armed men blew up a pipeline transporting natural gas to Jordan, an ally of Israel and the United States, said a senior Egyptian intelligence officer who asked not to be named.
Such attacks had ceased when Morsy was president.
Before that, armed groups destroyed pipelines every few months, he said.
State-run EgyNews reported Sunday that three police officers in northern Sinai were shot and wounded while on duty when someone in an unmarked car fired shots at them and sped away.