Terrorism 101 - don't conduct a class demonstration with a belt packed with live explosives.

In a rather cautionary tale for terrorist teachers, a gang of 22 Iraqi militants accidentally set off their own car bomb as they were making a bungled promotional propaganda video about the joys of being a suicide bomber.

Officials said security forces rushed to the area after hearing the sound of the explosion. They arrested 12 wounded suspected militants plus another 10 trying to flee the area.

TOP STORIES TODAY

Iraqi civilians have reacted to the news with dark humour.

Raad Hashim, working the counter at a liquor store near the site of the attack, couldn't stop laughing when he heard the news, the New York Times reported.

“This is so funny,” Mr. Hashim said. “It shows how stupid they are, those dogs and sons of dogs.”

Car bombs are one of the deadliest weapons used by the al-Qaida breakaway group in Iraq that dominates the Sunni insurgency in Iraq, with coordinated waves of explosions regularly leaving scores dead in Baghdad and elsewhere across the country.

“This is God showing justice,” Mr Hashim added. “This is God sending a message to the bad people and the criminals in the world, to tell them to stop the injustice and to bring peace. Evil will not win in the end. It’s always life that wins over death.”

An Iraqi army officer told The New York Times that the bomber's final lesson had killed "the bad guys for once".

Loading Slideshow...
  • Gunmen patrol during clashes with Iraqi security forces in Fallujah, Iraq in this Jan. 5, 2014 picture. (AP Photo)

  • Gunmen patrol during clashes with Iraqi security forces in Fallujah, Iraq in this Jan. 5, 2014 picture. (AP Photo)

  • A gunman aims his weapon during clashes with Iraqi security forces in Fallujah, Iraq in this Sunday, Jan. 5, 2014 picture. (AP Photo)

  • Gunmen guard during clashes with Iraqi security forces in Fallujah, Iraq, in this Jan. 5, 2014 picture. (AP Photo)

  • Mohammed Layth Ahmed weeps over the coffin of his father, Layth Ahmed, an Iraqi soldier who was killed during clashes in Ramadi, during his funeral procession in the Shiite holy city of Najaf, south of Baghdad, Iraq, on Monday, Jan. 6, 2014. (AP Photo/Jaber al-Helo)

  • Mourners carry the flag-draped coffin of Iraqi soldier Layth Ahmed, who was killed during clashes in Ramadi, during his funeral procession in the Shiite holy city of Najaf, Iraq, Monday, Jan. 6, 2014. AP Photo/Jaber al-Helo)

  • Gunmen declare the founding statement of the Military Council of Fallujah rebels, in Fallujah, Iraq, Monday, Jan. 6, 2014. (AP Photo)

  • Iraqis gather at the scene of a car bomb that detonated outside a central police station in the northern Iraqi city of Kirkuk on January 7, 2014. (MARWAN IBRAHIM/AFP/Getty Images)

  • Iraqis check their destroyed properties close to the the scene of a suicide car bomb that detonated outside a central police station in the northern Iraqi city of Kirkuk on January 7, 2014. (MARWAN IBRAHIM/AFP/Getty Images)

  • Iraqis inspect the burnt out remains of an Iraqi army Armoured Personnel Carrier along the side of the highway leading to the Anbar provincial capital of Ramadi, following clashes between Iraqi security forces and militants in the province on January 7, 2013. (AZHAR SHALLAL/AFP/Getty Images)

  • Members of an Iraqi Shiite fighters militant group called Kataib Sayyid al-Shuhadaa, or Master of Martyrs Brigades, chant slogans against the Sunni-dominated Free Syrian Army rebel group and the al-Qaida-affiliated Jabhat al-Nusra during the funeral procession of Yusuf Abdullah in the Shiite holy city of Najaf, Iraq, in this Jan. 6, 2014 photo. (AP Photo/Jaber al-Helo)

  • Members of an Iraqi Shiite fighters militant group Kataib Sayyid al-Shuhadaa carry the coffin of Yusuf Abdullah during his funeral procession in Najaf, Iraq, in this Jan. 6, 2014 photo. (AP Photo/Jaber al-Helo)

  • An Iraqi family with their belongings strapped to their car flee their home during clashes between the Iraqi army and al-Qaida fighters in Fallujah, Iraq, Monday, Jan. 6, 2014. (AP Photo)

  • A boy selling fuel waits for customers after the closing of all fuel stations in Fallujah, Jan. 6, 2014. (AP Photo)

  • Civilians buy medicine from the only open pharmacy in Fallujah, Iraq, Jan. 6, 2014. (AP Photo)

  • Iraqi soldiers monitor the traffic moving along a road in the area of Ein Tamer which leads west out of the central Iraqi Shiite Muslim shrine city of Karbala towards the mainly Sunni Muslim city of Fallujah, on January 6, 2014. (AHMAD AL-RUBAYE/AFP/Getty Images)

  • Iraqi security forces and people gather at the site of a road side bomb attack in central Baghdad, Iraq, Jan. 5, 2014. (AP Photo/Hadi Mizban)

  • Iraqi riot police officers grieve during the funeral procession for a fellow officer Methaq Jaber, who was killed during clashes between Iraqi army and al-Qaeda fighters in Anbar province, in Basra, Iraq's second-largest city, Jan. 5, 2014. (AP Photo/Nabil al-Jurani)

  • Basra riot police unit convoy returns to its headquarters from the clashes between Iraqi army and al-Qaeda fighters in Anbar province, in Basra, Iraq, Jan. 5, 2014. (AP Photo/Nabil al-Jurani)

  • Burnt-out lorries are seen littering the side of the main highway leading west, out of the capital Baghdad, to the city of Fallujah, on January 5, 2014. (Sadam el-Mehmedy/AFP/Getty Images)

  • Iraqi men queue to fill containers with fuel in Fallujah, Iraq on January 5, 2014. (Sadam el-Mehmedy/AFP/Getty Images)

  • A man shows off the V-sign for victory as he stands on top of a burn out lorry on the side of the main highway leading west out of the capital Baghdad to Fallujah, on January 5, 2014. (Sadam el-Mehmedy/AFP/Getty Images)

  • Iraqi men from local tribes brandish their weapons as they pose for a photograph in the city of Fallujah, on January 5, 2014. (Sadam el-Mehmedy/AFP/Getty Images)

  • Mourners and Sunni gunmen chant slogans against Iraq's Shiite-led government during the funeral of a man killed when clashes erupted between al-Qaida gunmen and Iraqi army soldiers on Friday, his family said, in Fallujah, Iraq, Saturday, Jan. 4, 2014. (AP Photo)

  • Al-Qaida fighters set up a checkpoint looking for policemen and army soldiers in front of the main provincial government building, in Fallujah, Iraq, Jan. 1, 2014. (AP Photo)

  • A police truck full of prisoners being transported was set afire by al-Qaida fighters after they freed prisoners in front of the main provincial government building, in Fallujah, Iraq, Jan. 1, 2014. (AP Photo)

  • An Iraqi federal policeman searches a man at a checkpoint in Baghdad, Iraq, Tuesday, Dec. 31, 2013. (AP Photo/Karim Kadim)

  • Iraqi Sunni masked protesters burn tires to blocked the main highway to Jordan and Syria, outside Fallujah, Iraq, Dec. 30, 2013. (AP Photo)