BAGHDAD
— The Sunni and Shiite residents of western Baghdad's Hurriyeh neighborhood have lived in harmony for years. Their families intermarry. They attend each other's weddings and funerals and pray in each other's mosques. It is a calm area too, with not a single attack reported against the coalition forces since April.

That coexistence, however, came to an abrupt end early Tuesday morning. An explosion beside a Sunni mosque killed three people and ripped the fabric of communal unity that bound Shiites and Sunnis, exposing the deep-rooted sectarian divisions within Iraqi society.

The Sunnis blame the explosion on militant Shiites belonging to the Al Dawa party and the Badr Brigades, the military wing of the Iran-backed Supreme Council for the Islamic Revolution in Iraq (SCIRI). The Shiites accuse Sunnis from the extremist Wahhabi sect of stirring up tensions between the two communities.

As the three victims were buried Wednesday, armed Sunni and Shiite gunmen took to the streets vowing revenge, while clerics pleaded for calm. Grim-faced American troops, backed by Apache helicopter gunships, patrolled the neighborhood.

It is up to the local Muslim clerics, who represent the voice of leadership in the community, to restore calm to the neighborhood. No easy task, however, given the young firebrands whose traditional obedience to and respect for the clerics runs up against an equally traditional desire for revenge.

"It is something tragic that God's house should be attacked," says Sheikh Farouk al-Batawy, the imam of the Ahbab al-Mustafa mosque. "Even nonbelievers condemn something like this."

Claims differ over the circumstances of the deadly explosion at 6:45 a.m. Tuesday in the courtyard of the Ahbab al-Mustafa mosque. The regular Sunni worshipers at the mosque say that two rocket-propelled grenades were fired from the roof of a neighboring school, no more than 20 yards away. The first rocket struck the ground in the courtyard, digging a small crater and punching a hole in one wall of the mosque. The second rocket hit a parked car in the courtyard. The vehicle blew up, igniting several jerrycans of fuel beside a generator, which augmented the force of the blast.

One of the victims was in the car when it was hit. The blast hurled the other two over a wall into the street.

"Two of them had their bodies torn," says Sheikh Batawy, speaking in a dimly lit room beside the mosque filled with somber-looking Sunni clerics and supporters. "I knew all three of them. They prayed regularly at the mosque."

He says that the explosion was the latest in a number of attacks against Sunnis in Baghdad.

"The relations with the Shiites have always been very good here. Only the Shiites who have come from outside Iraq want to cause problems, he says, referring to the Iran-trained Badr Brigades.

But local Shiite residents have a very different take on what happened.

"The people that died were Wahhabis, and they were putting a bomb in the car," says Abu Hussein, declining to give his full name. "No one fired RPGs at them. We had nothing to do with what happened."

The Shiites say that there have always been some Wahhabis living in the area, but they have grown more assertive since Saddam Hussein's downfall in April.

The Iraqi police are investigating the causes of the explosion, but the Shiite view that Islamic militants accidentally blew themselves up has some credence, according to Lt. Col. Frank Sherman of Boston, the commanding officer of the 1st Battalion, 13th Armor Brigade.

"The explosion was not caused by a fired RPG," he says. "The school roof is too close; the rockets would not have had time to arm."

Nonetheless, RPG fragments were recovered by the police, he adds, suggesting that it may have been a bomb of jerry-built RPG rounds of the type regularly used by militants against coalition troops.

Yet the truth behind the explosion mattered little Wednesday morning with Sunnis and Shiites content to believe the worst of each other.

As the residents prepared to bury the victims of the blast, dozens of Sunni gunmen entered the neighborhood, clutching AK-47 rifles, their heads swathed in red-and-white scarves and wearing identity badges proclaiming them to belong to the Khaled ibn Walid Forces.

A group of them stormed a Husseiniyeh, a Shiite prayer house and meeting place, forcing several families living on an upper floor out at gunpoint.

A crowd of around 3,000 Sunni mourners surged around the Husseiniyeh as the outdoor funeral service began, with armed guards standing on the roof and surrounding walls.

"Condemn the attack but don't blame people at random and don't suspect the Shiite clerics," Sheikh Ahmed Dabboush, a prominent Sunni cleric, tells the crowd using a loudspeaker. "Some Shiite movements are accused of these acts and they must be stopped. But we must continue living with the Shiites. and we must continue the harmony of Shiites and Sunnis and Arabs and Kurds."

As Sheikh Dabboush speaks, two Apache helicopter gunships arrive and circle slowly overhead a few hundred feet from the ground, the clatter of the rotor blades all but drowning out his words.

The heavy machine guns slung beneath the helicopters swivel in a threatening fashion and the crowd begins to shout angrily "Allah Akhbar!" "God is greatest!"

The hooded gunmen, their eyes flashing with anger, lower their rifles and glare at the circling helicopters. The throng of mourners files back onto the street, carrying aloft the three coffins draped in rugs and secured with ropes.

Once the crowd disappears, the local Shiites return to the Husseinyeh as American troops fan out in the streets.

Colonel Sherman says that his soldiers will remain in the area for the next three or four days until tempers have cooled.

"I have a psy-ops team with me," he says, indicating a Humvee with loudspeakers fitted to the roof. "We will tell the people what's going on. We are talking with the local leaders. I don't think it will develop. No one wants problems here."

But the Shiites inspecting the damage inside the Husseiniyeh are furious, and some call for revenge.

"Look what they have done," says one, pointing at a torn picture of Imam Ali, a cousin of the Prophet Mohammed who is revered by Shiites.

The loudspeaker system attached to the minaret lies smashed, a black-painted throne splintered from repeated kicks, and pictures of Shiite imams lie in shreds beside the front door.

Shiite gunmen have taken up positions outside the Al Allawi mosque a few streets away. One of the gunmen argues with a furious Shiite who demands revenge for the damage to the Husseiniyeh.

"Any attack on a Shiite building is an attack on all Shiites," says Yehya Abu Huda. "We don't want trouble. This is a Shiite and Sunni area. But we must have an apology to achieve a peaceful end."

Sheikh Mehdi al-Muhamadawy, a senior Shiite cleric in the area, says he visited the Ahbab al-Mustafa mosque after the explosion to pay condolences.

"They refused to let me in and told me to leave," he says. "I told them that I condemn the incident but they replied with cruel words. I forgive them for their actions because they were emotional."

Sheikh Muhamadawy says he has told his followers to remain calm and not to resort to violence. "I am facing a lot of pressure to let my people fight them," he says. "But I reject this and call instead for a peaceful solution - because otherwise the results will be seen in the graveyards and the hospitals."

He says he hopes to meet soon with his Sunni counterparts and restore peace.