A skirmish at a counter-terrorism unit in Baghdad's central Karrada district began when a prisoner grabbed a gun from a guard, killed several guards and Interior Ministry officers, and gave a weapon to other inmates, Major-General Qassim al-Moussawi said, Baghdad's security spokesman.
The dead included an al Qaeda leader known as the "Emir of Baghdad" who planned an attack on a Catholic church last October in which more than 50 people died, said Moussawi.
"Security forces and guards responded to the jail of the counter-terrorism department and killed 11 terrorist-prisoners ... including Huthaifa al-Batawi, the Emir of Baghdad, who was in charge of planning the church attack," Moussawi said.
Moussawi said seven security officers were killed in the skirmish and one other was wounded.
Batawi was arrested along with 11 others in late November in connection with the Oct. 31 assault on Our Lady of Salvation church during Sunday mass. Dozens of hostages and police died when Iraqi forces tried to free more than 100 Catholic hostages.
The attack was the bloodiest against Iraq's Christian minority since the 2003 U.S.-led invasion.
Moussawi said the situation at the jail was under control and no prisoners had escaped.
Iraqi security forces have been on high alert for revenge attacks by al Qaeda since U.S. commandos killed the group's leader Osama bin Laden in Pakistan on Monday.