Alan Chin for The New York Times

Religious chanting is part of a twice-a-week ritual at a Sufi shrine, or takia, in Kadra, an area of Baghdad.

BAGHDAD, Iraq, Aug. 18 - As the twilight ritual of the Sufi Muslims reached its crescendo, the five drummers pounded harder and quicker, inspiring the men standing in a circle to spin their heads ever more rapidly, their hip-length hair twirling through the air.

The sun dipped low beyond the shrine's inner courtyard, and the chanting rose in volume.

"God, you are the only surviving one, the only everlasting," the dozen men said in unison, their eyes closed, more than a hundred spectators surrounding them at this shrine in western Baghdad. "The oneness, the oneness."

Sufism, generally considered a branch of Sunni Islam, is divided into orders, the most famous being that of the Mevlevi, or whirling dervishes. Sufis seek, through dance, music, chanting and other intensely physical rituals, to transcend worldly existence and perceive the face of the divine. Their mysticism has contributed to their pacific reputation.

But in Iraq, no one is ever far removed from war. In a sign of the widening and increasingly complex rifts in Iraqi society, Sufis have suddenly found themselves the targets of attacks. Many Iraqis believe those responsible are probably fundamentalist Sunnis who view the Sufis as apostates, just one step removed from the Shiites.

Sheik Ali al-Faiz, a senior official at this Sufi shrine, or takia, rattled off a list of recent assaults - the leader of a takia in the insurgent stronghold of Ramadi was abducted and killed this month; a bomb exploded in a takia in Kirkuk earlier this year; gunmen beat Sufi worshipers at a mosque in Ramadi in January; a bomb exploded in the kitchen of a takia in Ramadi last September and a bomb in April 2004 destroyed an entire takia in the same city.

The early attacks were frightening, but until this spring there had been few Sufi deaths. Then, on June 2, a suicide bomber rammed a minivan packed with explosives into a takia outside the town of Balad, 40 miles north of Baghdad, killing at least 8 people and wounding 12.

The attack took place in the middle of a ritual. The minivan hurtled through the front gate, then exploded when people ran toward it, said a neighboring farmer who gave his name as Abu Zakaria. "I hurried there with my brothers in my car," he said. "It was a mess of bodies. I carried bodies to the car without knowing whether they were dead or alive."

Five days later, at a gathering of mourners in an assembly hall fashioned from reeds in the village of Mazaree, the head of the takia, Sheik Idris Aiyash, lamented the loss of his father and three brothers. "If we keep on like this, we might really face civil war," he said.

Some Sufi groups in Iraq have built up militias and are bracing for more violence.

At the recent twilight ceremony here, Kalashnikov-wielding guards watched from a rooftop. "It's really chaotic now in our society, because the killer doesn't know the people he's killing, and those being killed don't know why they're being killed," Sheik Faiz said. "The entire community is threatened, including us."

There are no accurate estimates of the number of Sufis in Iraq, though the biggest orders are in Baghdad and Iraqi Kurdistan. Sheik Faiz said there were dozens of takias in the capital alone and more than 100 across the country before the war. That number may have dropped by as much as a third since the American invasion, he said.

The guerrilla war has crippled the flow of pilgrims to the Abdul-Qadir al-Gailani Mosque in central Baghdad, one of the world's most important Sufi shrines. Stalls selling religious souvenirs outside stood largely neglected one recent afternoon. Sheik Mahmoud al-Esawi, the imam of the mosque, said Sufi visitors from far-flung places like India, Pakistan and Europe had stopped coming.

Many takias across the capital have opted to hold their ceremonies in the late afternoon, so worshipers can get home before sundown. "The lack of security has created many negatives in our society," Sheik Esawi said. "Some groups dislike the takias and their rituals."