Zane Mohammed, a gangly 19-year-old with an earnest face, watched with curiosity as the first Islamists in his Baghdad neighborhood came to barbershops, tea parlors and carpentry stores before taking over the mosques. They were neither uneducated nor poor, he said, though they focused on those who were.

Then, one morning while waiting for a bus to school, he watched a man walk up to a neighbor, a college professor whose sect Mr. Mohammed did not know, shoot the neighbor at point blank range three times, and walk back to his car as calmly “as if he was leaving a grocery store.”

“Nobody is thinking,” Mr. Mohammed said in an interview in October. “We use our minds just to know what to eat. This is something I am very sad about. We hear things and just believe them.”

Image The youth prison wing of the Iraqi police compound in Baghdad. Many young people have taken part in Iraqs sectarian violence. Credit... Johan Spanner for The New York Times

Weary of Bloodshed

By 2006, even those who had initially taken part in the violence were growing weary. Haidar, a grade-school dropout, was proud to tell his family he was following a Shiite cleric in a fight against American soldiers in the summer of 2004. Two years later, however, he found himself in the company of gangsters.

Young militia members were abusing drugs. Gift mopeds had become gift guns. In three years, Haidar saw five killings, mostly of Sunnis, including that of a Sunni cab driver shot for his car.

It was just as bad, if not worse, for young Sunnis. Rubbed raw by Al Qaeda in Mesopotamia, a homegrown Sunni insurgent group that American intelligence says is led by foreigners, they found themselves stranded in neighborhoods that were governed by seventh-century rules. During an interview with a dozen Sunni teenage boys in a Baghdad detention facility on several sticky days in September, several of them expressed relief at being in jail, so they could wear shorts, a form of dress they would have been punished for in their neighborhoods.