ISIS claimed responsibility early on Tuesday for a suicide bombing that ripped through a busy market in the Iraqi capital before Eid Al Adha holiday celebrations.
At least 35 people were killed, medical sources said.
In a message posted to its Telegram channel, the militant group said a suicide bomber named Abu Hamza Al Iraqi detonated his explosive belt in the middle of a crowd in Sadr City, an eastern Baghdad suburb on Monday night, killing more than 35 and wounding dozens others.
In one of the worst attacks in Baghdad in recent years, body parts of victims lay scattered across the previously bustling market that had been crowded with shoppers buying food before Eid Al Adha, according to an AFP photographer.
About 60 people were also wounded in the blast, medics said.
Video on social media from the scene showed smoke in a crowded marketplace and dazed-looking people trying to flee the area.
Baghdad residents lit candles for the victims of the bomb attack later on Monday.
Piles of merchandise lay on the ground after the explosion. Shopkeepers told the security forces how the blast occurred as they salvaged whatever they could.
Iraqi President Barham Salih called the bombing in the densely populated, majority-Shiite suburb of Sadr City a “heinous crime” and offered his condolences.
“They are targeting our civilians in Sadr City on the eve of Eid,” Mr Salih said on Twitter. “They do not allow people to rejoice, even for a moment.”
Eight women and seven children were among the dead, according to a medical sources.
“A terror attack using a locally made IED (improvised explosive device) in Woheilat Market in Sadr City, in east Baghdad, left several victims dead and others injured,” Iraq's Interior Ministry said in a statement.
Refrigerators full of water bottles were drenched with blood, and shoes were strewn on the ground alongside fruit, AFP journalists said.
Baghdad Operations Command, a joint military and interior ministry security body, said it had launched an investigation into the blast, and police and forensic teams were searching through the smoking wreckage for clues late on Monday
Prime Minister Mustafa Al Kadhimi convened an emergency meeting with his heads of military and security agencies.
In January, ISIS claimed responsibility for a rare twin suicide bombing that killed 32 people – also at a crowded market in Baghdad.
That blast was the city's deadliest attack in three years.
Such violence was commonplace in Baghdad during the sectarian bloodletting that followed the US-led invasion of 2003, and later on as ISIS swept across much of Iraq and also targeted the capital.
But after years of deadly violence, militant attacks have become relatively rare in Baghdad.
Sadr City has been a frequent target of terrorist attacks after the US invasion in 2003, which removed Saddam Hussein from power.
Monday's attack sparked a furious response from Iraqis on social media.
“Terrorism and the government's failure keep on stealing our lives,” tweeted Alaa Sattar, a youth activist. “The authorities have nothing but condolences to dole out and empty investigative committees.”
Another Twitter user wrote: “Every Eid, there's a tragedy in Baghdad. It's impossible to celebrate like the rest of humanity."
Iraq declared ISIS defeated at the end of 2017 after a fierce three-year campaign.
Yet the group's sleeper cells have continued to operate in desert and mountain areas, typically targeting security forces or state infrastructure with low-casualty attacks.
The US-led coalition that had been supporting Iraq's campaign against ISIS has significantly reduced its troop levels over the past year, citing the increased capabilities of Iraqi forces.
The US, which provides the bulk of the force, has 2,500 troops left in Iraq – down from 5,200 a year ago.
They are mainly in charge of training, providing drone surveillance and carrying out air strikes while Iraqi security forces handle security in urban areas.
Sadr City, where Monday's bomb blast took place, is named after revered Shiite cleric Mohammed Al Sadr.
His son, Moqtada Al Sadr – a firebrand cleric with millions of followers and in command of paramilitary groups – is a crucial player in Iraqi politics who has often protested against the influence of both the US and Iran.
The boycott by Mr Al Sadr of coming elections scheduled for October is a blow to Mr Al Kadhimi, who had called the early vote in response to demands by pro-democracy activists.