In Mr. Ahmad’s family the major themes of America’s war collided: secularism versus religiosity, the compromises of a civil society versus violent extremism, conflicting views of the United States as a society to be emulated or a calculating imperial power to be resisted. The family’s story also reveals, at this late stage in the war, an insurgency much weakened but still alive and angry, now focused on assassinating those who worked with the departing Americans or were members of the Awakening, mostly former insurgents who switched sides to help the Americans.

The drama played out in Mr. Ahmad’s crowded, squat concrete house in a village on the outskirts of this ancient city. For seven years Iraqis have chosen sides, often along generational lines. For Mr. Ahmad, 52 when he was killed, the war could not have come soon enough. In the 1990s he was put in prison  for speaking out against the government, his family says  but he was released on the eve of the American invasion in 2003.

Two of his three sons and a nephew, who all lived under the same roof with Mr. Ahmad, joined the insurgency. In his own home, Mr. Ahmad was constantly hectored as a spy and a traitor. Samarra was a fertile place for unrest: it was here that the sectarian fighting escalated into civil war in February 2006 when the golden dome of the Askariya Mosque was blown up.

“I wanted to fight against the Americans, to kick them out,” the son said.

By his own account, he joined the Sunni insurgency at the urging of his cousin as a member of Ansar al Sunna, a militant group that fought the American occupation. A family member said he joined earlier this year after pressure from his cousin and older brother, both of whom joined the insurgency years ago and are being sought by the police.

“When Al Qaeda came to our areas it was easy to get the young people because they were religious and there were promises of paradise,” said Abd al-Hakim Ahmad, the victim’s brother, referring to Al Qaeda in Mesopotamia, a Sunni extremist group.