Iraq is currently suffering from both terrorism and sectarianism. Often enough, the former is provoking the latter, as has been demonstrated by the escalating mosque bombings. The worst aspect of terrorism: well, all of it, but the mosques are where they're inflicting most of the casualties, and inciting most of the strife. The worst aspect of sectarianism: those illegal militias that impose religious law and threaten to sweep the nation into civil war.
The solution? Legalize the militias as "Holy Protection Forces", or something like that. They would be allowed to act as an-almost police within a certain distance, say 200 yards, of religious buildings, principally mosques. Naturally, there would be a few stipulations. First, each one would have to be associated with and approved by its particular religious site and the residents of the surrounding area, and obtain a license from their local and national government. Second, they would be regulated. They would have to publish salaries, number of "guards", and other information that comes in handy when trying to keep small armies in line. They would only have the power to make arrests, and would have to prove to a court that they killed in self defense, should the occasion arise (which it will). Finally, these HPF's would have to immediately forward any and all cases to the real police as fast as possible.
Thus you have the ultimate solution. The militias become regulated (or atleast the groundwork would be laid for regulation, Iraq is in no shape to enforce many laws right now), and they would serve a purpose, legally defending the most vulnerable and most strife-inducing targets.
Then perhaps the situation experienced last week would have been different. Instead of twelve commando type terrorists walking into an abandoned mosque with four asleep guards in a back room, subsequently provoking the blind rage of thousands of militia men against Sunnis everywhere, some of those thousands could have instead been defending that mosque, stemming the problem at its source rather than exacerbating it.
Just a thought.