Militants accidentally set off their own car bomb at a training camp north of Baghdad, leaving 21 of their number dead, Iraqi officials said.
The militants were attending a lesson on making car bombs and explosive belts at the camp near the town of Samarra when a glitch set off one of the devices, a police officer said.
Security forces rushed to the area after hearing the sound of the explosion, arresting 12 of the wounded plus another 10 suspected militants trying to flee the area, the officer said.
Medical officials confirmed the casualties.
Violence has spiked in Iraq since April of last year. Militant groups regularly stage co-ordinated car bomb attacks in the capital.