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.
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.
More From This Section
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 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.
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.