BAGHDAD -- Gun battles erupted in cities with Sunni majorities across Iraq on Tuesday after security forces from the Shiite-led government stormed a Sunni protest encampment in a village near the northern city of Kirkuk. The clashes left dozens dead and wounded, and raised fears that the sectarian civil war that is roiling Syria might spill into Iraq.
The fiercest fighting was at the encampment in a town called Hawija, where Sunni gunmen fought government forces throughout the day. At least 42 people were killed, 39 of them civilians, and more than 100 wounded.
As evening fell, sporadic fighting continued there and in Ramadi in the Sunni homeland of Anbar Province, where protesters set fire to two military vehicles and tribal sheiks called on young men to take up arms against the government.
The fighting represented the deadliest turn yet in a Sunni-led protest movement against the government of Prime Minister Nuri Kamal al-Maliki. By the end of the day, the country was on edge as Sunni tribesman mobilized, declaring jihad, or holy war. Adding to the tensions, an influential Iraqi religious leader who lives in Amman, Jordan, Sheik Abdul Malik al-Saadi, seemed to endorse the call to arms by saying, "Self-defense has become a legitimate and legal duty."
By nightfall, however, Iraq's leaders on both sides of the sectarian divide were scrambling to calm the situation. After first defending the fighting as a necessary operation against Al Qaeda and Baath Party sympathizers, the Maliki government promised to compensate victims, provide medical treatment to the wounded and hold military leaders accountable for mistakes.
Osama Nujaifi, the Sunni speaker of Parliament, said, "What happened this morning is a disaster by any measure." He added that the fighting "has opened the door to great strife."
"Now there are clashes taking place between Iraqi tribes and the Iraqi Army," he said. "We call on the armed forces not to obey the orders to attack the demonstrators or shoot Iraqis, and we call on the tribes to cease fire and be calm."
Iraq's Shiites and Sunnis fought a brutal civil war from 2005 to 2007, but while violence has declined, there has never been a full reconciliation. The civil war in Syria, which pits a Sunni-led rebellion against a government dominated by Alawites, an offshoot of Shiite Islam, has hardened differences here, as each sect takes sides.
The fiercest fighting group in Syria, Jabhet al-Nusra, has been fostered by Al Qaeda in Iraq, a Sunni insurgent group. Iraq's government has lined up on the side of the Syrian government, allowing its territory to be a transit corridor for the supply of weapons -- mainly from Iran -- to the forces of the Syrian president, Bashar al-Assad.
As the war in Syria grinds on, analysts and American officials are increasingly worried about its spreading into Iraq. Barham Salih, the former prime minister of Iraq's semiautonomous Kurdish region in the north, wrote on Twitter on Tuesday after the violence in Hawija that "Iraq, Syria dynamics" could merge into one fight with "dire consequences."
The American Embassy released a statement in the evening condemning "the actions that resulted in the death and injury of civilians and security personnel in Hawija."
"We regret that this violence took place before ongoing efforts to reach a peaceful resolution of this situation were given sufficient time to succeed," the statement said.
The clashes reverberated across the country in seething Sunni communities, where protesters have set up encampments like those established in Tahrir Square during the Egyptian revolution.
Sunni mosques were bombed in the mixed Baghdad neighborhood of Dora and the volatile city of Diyala, killing 10 people. In Saddam Hussein's hometown, Tikrit, the authorities imposed a curfew after gunmen twice attacked security forces.
In Falluja, where clashes between the army and protesters in January killed at least seven protesters, thousands of citizens took to the streets demanding that the international community stop what they described as the "massacres of the government." Near Hawija, Sunni gunmen briefly took control of some government checkpoints.
"The peaceful demonstrations are over, due to what happened today," said Saddoun al-Obaidi, a tribal leader in Hawija who is a leader of the protest movement. "Now we are going to carry weapons. We have all the weapons we need, and we are getting support from other provinces."
Protest leaders in other Sunni cities vowed solidarity with their brethren in Hawija. "The demonstrators in Mosul left the sit-in area to take up arms in support of demonstrators in Hawija and take revenge for them," said Salim al-Jabouri, a spokesman for the Sunni movement there.
In Baghdad, security forces blockaded the Sunni-dominated neighborhood of Adhamiya, allowing entry only to those who proved they were residents. Two Sunni government ministers said they had resigned their positions, and leaders of Iraqiya, a largely Sunni bloc of lawmakers, announced they were suspending their participation in Parliament.
The raid by government forces followed days in which the army and the police had surrounded the protest camp, demanding that its leaders turn over the gunmen who the authorities said had sought refuge there after attacking a government checkpoint, killing one soldier and wounding three others.
A statement released by the Ministry of Defense said that gunmen on Friday had "attacked a joint checkpoint of the police and army that led to the death and injury of our fighters, and they also took our weapons and then disappeared among the protesters."
On Tuesday morning, after the protesters refused to turn over the gunmen, soldiers and police officers stormed the protest camp, the Defense Ministry said.
"The security forces did their duty to impose the law," the statement said. "They faced heavy weapons and snipers, and the clashes resulted in the death of a number of our forces and the killing of a number of Baathists and Al Qaeda members that have been coordinating with the protesters."
The ministry said security forces had seized 40 Kalashnikov rifles and other automatic weapons, hand grenades and swords and knives.
Martin Kobler, the United Nations' representative in Iraq, rushed to Kirkuk on Tuesday to meet with local officials, urge an end to the fighting and demand that detainees rounded up by security forces be treated humanely. "It's up to the leaders of this country to sit together in dialogue in order to avoid further bloodshed," Mr. Kobler said in an interview.
The violence occurred days after Iraq held local elections, which were largely peaceful and carried out under extraordinary security measures. The elections, though, were postponed in two largely Sunni provinces, Anbar and Nineveh, and were never scheduled in Kirkuk, which is rich in oil and disputed by Arabs and Kurds.
Yasir Ghazi and Duraid Adnan contributed reporting from Baghdad, and employees of The New York Times from Kirkuk, Anbar, Nineveh and Salahuddin Provinces, Iraq.
This article originally appeared in The New York Times.