We also put a new focus on meeting the needs of the people  not just keeping people safe, but trying to avoid violence from starting by encouraging Tel Afar’s different groups to talk to one another. Once we gained widespread trust in our impartiality, we could be fairly sure that any resident who saw something suspicious would quickly report it to the authorities.

The Iraqi government needs to apply these same principles to the national security forces. Both the military and the police remain heavily politicized. The police and border officials, for example, are largely answerable to the Interior Ministry, which has been seen (often correctly) as a pawn of Shiite political movements. Members of the security forces are often loyal not to the state but to the person or political party that gave them their jobs.

The same is true of many parts of the Iraqi Army. For example, the Fifth Iraqi Army Division, in Diyala Province northeast of Baghdad, has been under the sway of the Islamic Supreme Council of Iraq, the Shiite party that has the largest bloc in Parliament; the Eighth Division, in Diwaniya and Kut to the southeast of the capital, has answered largely to Dawa, the Shiite party of Prime Minister Nuri Kamal al-Maliki; the Fourth Division, in Salahuddin Province in northern Iraq, has been allied with one of the two major Kurdish parties, the Patriotic Union of Kurdistan.

More recently, the Iraqi Awakening Conference, a tribal-centric political party based in Anbar Province (where Sunni tribesmen, the so-called Sons of Iraq, turned against the insurgency during the surge) has gained influence over the Seventh Iraq Army Division, which was heavily involved in recruiting Sunnis to maintain security in 2006.

These political schisms are partly responsible for coordinated terrorist attacks like those on Sunday or the so-called Bloody Wednesday bombings of Aug. 19, which killed more than 100. The aim of such assaults is to pull the rug from under Prime Minister Maliki in advance of the January elections. Mr. Maliki has used the security gains of the last two years as his political trump card, a strategy that gave Dawa huge gains in provincial elections last February. However, if attacks on the government rise, his opponents will harp on them in order to break Dawa’s political momentum.