BAGHDAD, Oct. 17 -- Police and black-clad Shiite militiamen toting machine guns sealed off the predominantly Shiite city of Balad on Tuesday, guarding against attacks by Sunni insurgents flooding into towns just north of Baghdad, vowing revenge for four days of violence in which dozens of Sunnis were killed.

Calm largely returned to Balad by Tuesday, with Iraqi army troops forcing Shiite militia fighters out of police cars that the militiamen had commandeered for the attacks, said residents reached by telephone in the cut-off town. American troops patrolled the city and guarded one end of a Tigris River bridge that links Balad with Duluiyah, a Sunni farm town also at the epicenter of the outburst of sectarian conflict.

On the Duluiyah end of the bridge, angry Sunni insurgents gathered in force, clutching their PKC machine guns and rocket launchers, standing their tense watch. Abu Achmed, a fighter in the Islamic Army, a Sunni insurgent movement, held a machine gun but wished for more.

"If I had a nuclear bomb, I would wipe it out," the insurgent fighter, who refused to give his full name, said as he stared at Balad across the bridge. "I would level it."

Since Friday, a Shiite militia campaign of killing and expulsion targeting Sunni families served both to deepen sectarian tensions in Iraq and expose the inability or unwillingness of the Shiite-dominated government to control the attacks. The government is headed by two Shiite religious parties whose militias led the campaign, according to local residents, Shiite community leaders, police and hospital officials. Forces of the country's heavily Shiite police watched the cleansing campaign, or took part in it, the witnesses said. The Interior Ministry denied the allegation.

Militia attacks on Sunnis in and around Balad ended only when large numbers of Iraqi army troops, seen as more neutral than Iraq's police, were deployed. By Tuesday, all but four or five Sunni families had fled. Until recently, members of the town's Sunni minority had lived and intermarried peacefully with Shiite neighbors for generations.

"What shall I say to Bush, to the armed men, to Maliki?" cried Um Mustafa, sheltering in a stranger's home on the outskirts of Duluiyah, referring to Iraqi Prime Minister Nouri al-Maliki. She was with her 11-year-old son, Mustafa, and 7-year-old daughter, Reaam. Fleeing Balad this past weekend, the family had watched Shiite militiamen dressed in black beat her pleading husband in the face with rifle butts and take him away. The next day, her phone calls traced her husband's body to the Balad hospital morgue.

"What have I done that my husband gets killed in this way?" she said. "I have Mustafa. And I will teach him how to avenge his father's death by the Mahdi Army, and take his revenge, from them."

In Balad, mosque loudspeakers that days earlier had cried out for all Sunnis to leave called for their return, promising that the Mahdi Army militia of powerful Shiite cleric Moqtada al-Sadr would protect them.

Drawing on centuries-old codes of revenge, the Sunni fighters in Duluiyah responded by demanding that Balad, encircled by Sunni towns, surrender the militia fighters responsible for the killings -- or face retaliation.

Armed men stopped 13 vehicles near a police checkpoint south of Balad on Monday night and took them and their occupants away to an area known to be a Sunni insurgent dumping ground for murder victims, provincial police said.

The sectarian bloodletting was triggered Friday in Duluiyah when Sunni insurgents kidnapped and beheaded 17 Shiite farmworkers. Balad hospital officials said at least 80 Sunnis were shot to death, many after torture with electric drills. The U.S. military said it had recorded 57 killings. In a statement Tuesday, it said six civilians in Balad had been killed by mortar rounds that were launched, residents said, from Duluiyah. U.S. forces had arrested two Duluiyah policemen suspected of working with insurgents in the killing of the 17 farmworkers, the military said.

The military statement, issued Tuesday morning, cited a "marked decrease in violence" in Balad over the past 24 hours and credited joint operations by Iraqi and U.S. forces for the reprieve.

In attacks elsewhere in Iraq, the Interior Ministry said at least 65 bodies had been found around Baghdad since Sunday night. Bombs and shootings killed at least 20 other people, including four college students and a female doctor shot to death in the southern city of Basra.

A report released Tuesday by the Brookings Institution-University of Bern Project on Internal Displacement cited Iraqi government data that 234,600 Iraqis were displaced since February, when the bombing of a Shiite mosque in Samarra triggered a wave of violence, especially by Shiite forces. The total was probably low, since many of the displaced had likely sheltered with families, the study said.

"It is likely that sectarian violence is causing lasting change to Iraq's social and demographic make-up," the report stated.

On trial for his life on genocide charges, deposed president Saddam Hussein spoke to the rising violence outside his heavily guarded courtroom in Baghdad's Green Zone. "We are one people, as Iraqis, we have Arabs and Kurds," Hussein said, holding a Koran he has kept at his side throughout his trial. "The only party that benefits from division is Zionism."

Shiite militia leaders say Hussein's decades of ruthless Sunni minority rule paved the way for the sectarian slaughter exploding now. Asked about Iraq's bloodshed, a top Shiite political leader, Abdul Aziz Hakim of the Supreme Council for the Islamic Revolution in Iraq, made the same argument.

"The reason is obvious, a great change in Iraq has taken place," he said. "The people who were governing Iraq were unjust. Such people are gone, and I hope for good."

In Baghdad, the Interior Ministry removed two officers in charge of commando units as part of a restructuring plan announced last week.

Brig. Abdul-Karim Khalaf, the ministry's spokesman, said Maj. Gen. Rashid Filah and Maj. Gen. Mahdi Sabbih were transferred from their posts, but denied their removal was a demotion or had anything to do with militia activity. Maliki's government has been under increasing pressure from U.S. officials to clean up the Shiite militias, often accused of working in concert with Shiite-dominated commando forces.