CAIRO -- Enraged Islamists pushed back Friday against the toppling of President Mohammed Morsi, as tens of thousands of his supporters took to the streets vowing to win his reinstatement and clashed with their opponents in violence that killed 30 and drove the divided nation toward an increasingly dangerous showdown.
In a battle on a bridge over the Nile River in Cairo, gunfire rang out and flames leapt from a burning car as the rival camps threw volleys of stones and fireworks at each other. Military armored vehicles raced across the bridge in a counterattack on Morsi's supporters.
The clashes accelerated after the supreme leader of Morsi's Muslim Brotherhood defiantly proclaimed that his followers would not give up street action until the return of the country's first freely elected president, swept out of power days earlier by the military. Morsi opponents called out the public to defend against the Brotherhood, deepening the battle lines.
In scenes of mayhem, troops opened fire on peaceful pro-Morsi protesters. Islamists threw one opponent off a rooftop.
"God make Morsi victorious and bring him back to the palace," Brotherhood chief Mohammed Badie proclaimed before cheering supporters at a Cairo mosque in his first appearance since the overthrow. "We are his soldiers, we defend him with our lives."
Badie said it was a matter of honor for the military to abide by its pledge of loyalty to the president, in what appeared to be an attempt to pull it away from its leadership.
"Your leader is Morsi. ... Return to the people of Egypt," he said. "Your bullets are not to be fired on your sons and your own people."
Hours later, Badie's deputy, Khairat el-Shater, considered the most powerful figure in the organization, was arrested in a Cairo apartment along with his brother on allegations of inciting violence, Interior Ministry spokesman Hani Abdel-Latif told The Associated Press.
After the speech, a large crowd of Islamists surged across 6th October Bridge over the Nile toward Tahrir Square, where a giant crowd of Morsi's opponents had been massed all day. Battles broke out there and near the neighboring state TV building. Pro-Morsi youths shielded themselves from flying stones and fireworks with sheets of barricaded metal. A car burned at the top of an exit ramp amid the sounds of automatic weapons and shotguns.
"They are firing at us, sons of dogs! Where is the army?" one Morsi opponent shouted as another was brought to medics with his jeans soaked in blood from leg wounds. At least three people were killed at the bridge.
The fighting ended when at least seven armored personnel carriers sped across the bridge, chasing away the Morsi supporters. Young civilians jumped onto the roofs of the APCs, shouting insults at the Islamists and chanting, "The people and army are one hand."
Across the country, clashes erupted as Morsi supporters tried to storm local government buildings or military facilities, battling police or Morsi opponents. At least 30 people were killed throughout the day in Egypt, with 210 wounded, Heath Ministry official Khaled el-Khatib told The Associated Press.
Islamists descended on an anti-Morsi rally, opening fire with guns in the Mediterranean coastal city of Alexandria, where at least 12 people were killed, mostly Morsi opponents, emergency services official Amr Salama said. One man was stabbed and thrown from the roof of a building by Morsi supporters after he raised an Egyptian flag and shouted insults against the ousted president, according to an Associated Press reporter at the scene.
Five policemen were killed by militants in shootings around Sinai city of el-Arish, according to security officials speaking on condition of anonymity because they were not authorized to talk to the media.
The U.S. State Department condemned the violence and called on all Egyptian leaders to denounce the use of force and prevent further bloodshed among their supporters.
"The voices of all who are protesting peacefully must be heard -- including those who welcomed the events of earlier this week and those who supported President Morsi," State Department spokeswoman Jen Psaki said in a statement. "The Egyptian people must come together to resolve their differences peacefully."
Col. Ahmed Ali, a spokesman for the armed forces, said the Muslim Brotherhood was trying to "pick a fight" with the army and "drag it to a clash in order to send a message to the West that what happened in the country is a coup and that the military is cracking down on the peaceful protesters."
That mirrored a statement from an umbrella group of Morsi opponents -- including the National Salvation Front and youth groups. The group urged the public to take to the streets immediately "to defend popular legitimacy" against what they called a "malicious plot" by the Brotherhood.
Islamists vowed to show by their numbers and the turmoil that the military had made a mistake by removing Morsi on Wednesday night. The action followed mass demonstrations for four days this week by the president's opponents in the biggest rallies the country has seen.
"The military got itself in a trap by taking one side. Now they see the masses in the streets and now they realized that there are two peoples," Hamada Nassar, a figure from the hard-line former militant group, Gamaa Islamiya, told AP.
An interim president -- senior judge Adly Mansour -- was sworn in Thursday, and a Cabinet of technocrats is to be formed to run Egypt until new elections can be held, although officials have not said when that will be. Mansour dissolved the interim parliament -- the upper house of the legislature -- which was overwhelmingly dominated by Islamists and Morsi allies. He also named the head of General Intelligence, Rafaat Shehata, as his security adviser.
The Islamists called rallies Friday to express their outrage at Morsi's ouster. The Brotherhood has said it will not work with the new military-backed leadership, and Morsi's supporters say the armed forces have wrecked Egypt's democracy by carrying out a coup against an elected president.
They accuse loyalists of former leader Hosni Mubarak, ousted in 2011, and liberal and secular opposition parties of turning to the army for help because they lost the election to Islamists. Many also see it as a conspiracy against Islam.
The turmoil began in the afternoon when army troops opened fire as hundreds of his supporters marched on the Republican Guard building in Cairo. That site is where Morsi was staying when he was toppled before being taken into military custody at an undisclosed location.
The crowd approached a barbed wire barrier where troops were standing guard. When one person hung a sign of Morsi on the barrier, soldiers tore it down and told the crowd to stay back. A protester put up a second sign, and the soldiers opened fire, according to an AP photographer.
A protester fell dead with a gaping, bleeding wound in the back of his head, while others were bloodied and wounded. Witnesses told AP Television News at the scene that men in plain clothes fired the lethal shots. The Health Ministry said a total of four were killed at the site, though it was not known how all died.
Protesters threw stones at the troops, who responded with volleys of tear gas. Many of those injured had wounds typical of birdshot. The BBC's Middle East editor, Jeremy Bowen, was hit by birdshot in the head as he covered the clashes but said his injuries were superficial.
Badie made his appearance three hours later on a stage in front of tens of thousands of Islamists massed at Rabia al-Adawiya Mosque, not far from the Republican Guard building.
Morsi "is my president and your president and the president of all Egyptians," Badie proclaimed, thrusting his arms in the air, as a military helicopter circled low overhead.
The gray-haired Badie is a revered figure among the Brotherhood's followers, who swear an oath of absolute obedience to him -- to "hear and obey."
The circumstances of his appearance were a mystery. Security officials had said Badie was taken into custody from a villa on the Mediterranean coast soon after Morsi's removal Wednesday night and flown to Cairo, part of a sweep that netted at least five other senior Brotherhood figures and put around 200 more on wanted lists.
Just before his speech, the Brotherhood's political party said on its webpage that Badie had "been released." Onstage, however, Badie denied he had been arrested. There was no immediate explanation from security officials.
Authorities also announced the release of Saad Katatni, head of the Brotherhood's political arm the Freedom and Justice Party, as well as one of Badie's deputies, Rashad Bayoumi, pending further investigation.
Fears have been running high over an Islamist backlash to Morsi's overthrow. Extremist Islamist groups that gained considerable freedom to operate during Morsi's year in office have already vowed violence in retaliation.
The first major militant attack came before dawn Friday in the tumultuous Sinai Peninsula, killing at least one soldier. Masked assailants launched a coordinated attack with rockets, rocket-propelled grenades and anti-aircraft guns on the airport in the northern Sinai city of el-Arish, where military aircraft are located. Also hit was a security forces camp in Rafah on the border with Gaza, and five other military and police posts.
One of military's top commanders, Gen. Ahmed Wasfi, arrived at el-Arish to lead operations there as the army declared a "war on terrorism" in Sinai. A crowd of Morsi supporters tried to storm the governor's office in the city but were dispersed by security forces.
On the night of Morsi's ouster, jihadi groups rallied in el-Arish, vowing to fight. "War council, war council," a speaker shouted, according to online video of the rally. "No peacefulness after today."
Islamic militants hold a powerful sway in the lawless northern Sinai. They are heavily armed with weapons smuggled from Libya and have links with militants in the neighboring Gaza Strip, run by Hamas. After the attack, Egypt indefinitely closed its border crossing into Gaza, sending 200 Palestinians back into the territory, said Gen. Sami Metwali, director of Rafah passage.
At the Rabia al-Adawiya Mosque rally earlier in the day, the crowd filled much of a broad boulevard, vowing to stay until Morsi is reinstated. The protesters railed against what they called the return of the Mubarak regime.
"The old regime has come back ... worse than before," said Ismail Abdel-Mohsen, an 18-year-old student at the mosque rally. He described the interim president as "the military puppet."
"After sunset, President Morsi will be back in the palace," they chanted. "The people want God's law. Islamic, Islamic, whether the army likes it or not."
Many held copies of the Quran in the air, and much of the crowd had the long beards of ultraconservative men or encompassing black robes and veils worn by women.
One protester shouted that the sheik of Al-Azhar, Egypt's top Muslim cleric who backed the military, was "an agent of the Christians" -- reflecting a sentiment that the Christian minority was behind Morsi's ouster.
In southern Egypt, Islamists attacked the main church in the city of Qena. In the town of Dabaiya near the city of Luxor, a mob torched houses of Christians, sending dozens seeking shelter in a police station.