"A soldier at the gate of Jamila market opened fire on a suicide car bomb after noticing a suspect vehicle but the terrorist blew up his car."
A suicide bomber targeted Baghdad's main vegetable market Sunday, killing at least 12 people in the latest attack claimed by the Islamic State group as Iraqi forces battle the jihadists for Mosul.
Iraqi forces have pushed IS out of much of the territory it once held, but this bombing and the many others that have preceded it highlight the danger the jihadists can pose to civilians even as they lose ground.
"A soldier at the gate of Jamila market opened fire on a suicide car bomb after noticing a suspect vehicle but the terrorist blew up his car," interior ministry spokesman Saad Maan said.
A police colonel and a hospital official said at least 12 people were killed and 39 wounded. Maan said the soldier who opened fire on the attacker was among the wounded.
Jamila is the main wholesale vegetable market in Baghdad and lies in Sadr City, a vast, mostly Shiite neighbourhood in the northeast of the capital which has been repeatedly targeted.
IS issued an online statement claiming the attack, using a nom de guerre indicating the bomber was Iraqi and saying that he targeted members of Iraq's Shiite Muslim majority, whom the jihadists consider heretics.
IS claimed an attack on January 2 -- also in Sadr City -- when a suicide bomber blew up a vehicle packed with explosives among a crowd of day labourers waiting for work, killing 35 people.
The jihadists overran large areas north and west of Baghdad in a swift 2014 offensive that swept through security forces unprepared for the assault.
The number of bombings in the capital declined following the June 2014 offensive, apparently because the jihadists were occupied with holding territory they seized and later defending against Iraqi attacks.
Federal forces and units from Iraq's autonomous Kurdish region have since pushed IS back in a series of battles over a period of more than two years.
On October 17, Iraqi forces launched a massive operation to recapture Mosul, now the country's last city in which IS holds significant ground.
Iraqi forces punched into the city from the east, retook a series of neighbourhoods, and are now approaching the Tigris River, which divides the city into its eastern and western sides.
The western side, which is the smaller but more densely populated of the two, remains entirely under IS control.
Iraqi forces have also launched an operation to recapture IS-held towns near the Syrian border in Anbar province that along with Mosul and the northern town of Tal Afar are among the last populated areas under jihadist control.
Iraqi Prime Minister Haider al-Abadi said in late December that three months were needed to eliminate IS in the country.
But even if the jihadists no longer openly hold territory, they can still strike at Iraqi civilians and security forces using bombings and hit-and-run attacks.