'Then you just press this button...'
'Then you just press this button...'Thinkstock

At least 22 Iraqi terrorists died Monday during a training exercise after a commander instructing would-be suicide bombers accidentally detonated himself.

Some news outlets had initially reported Iraqi security sources as saying the blast was the result of a car bomb which prematurely exploded on a desert road about 20 kilometers (12 miles) from the city of Samarra. Samarra's suburbs have long been a Sunni stronghold in a Shia country. 

Local militias told AFP that the terrorists had been filming a propaganda video before a planned suicide bombing when the vehicle exploded. Instead, the terrorists filmed their own deaths. 

According to the Washington Post, the explosion occurred just outside a terrorist training camp, where the terrorists had been planning on adding a segment on car bomb assembly to the film.

But according to a New York Times report the incident occurred as a well-known commander of the Islamic State of Iraq and the Levant (ISIS), an Al Qaeda franchise which is also involved in the Syrian civil war, accidentally detonated himself during a training session. He apparently did not realize that the belt he was wearing was "live"; the blast killed 21 of his students and injured up to 20 others.

Militia forces rushed to the scene at the sound of the explosion and arrested 12 terrorists at the scene and another 10 attempting to flee. 

Security forces later found seven car bombs, several explosive belts and roadside bombs after searching two houses and an orchard nearby, according to the Post

The clashes mark another deadly day in Iraq, which saw more than 8,800 people killed in 2013 alone in sectarian clashes.  

Al Qaeda has been attempting to take over the Sunni-majority areas of Iraq, testing the Shia-dominated government after the US pulled out over two years ago. Tensions have simmered over in Iraq's political vacuum, with the Sunni population harboring resentment over alleged discrimination and sectarian-motivated attacks by authorities.

The chaos in neighboring Syria has also helped foment violence, as Al Qaeda uses the war-torn country as a base to train global jihadists, who can easily cross the porous Iraqi-Syrian border.