The first car bomb was detonated outside a popular ice cream shop just after midnight, killing at least 15 and wounded 27 in the commercial Karrada district, police and health officials said. A few hours later, a second explosives-laden car went off during rush hour near the state-run Public Pension Office near the al-Shahada (Martyrs') Bridge in the busy Shawaka district, killing at least 12 and wounding 23 more, a police officer said.
The attacks came just days into the holy month of Ramadan when Muslims fast during daylight. After sunset, families break their fast and Baghdad's restaurants and cafes quickly fill up with people staying up long into the night to prepare for the next day's fast.
Isis claimed for both attacks in the mainly Shia district through its Amaq news agency.
CCTV video of the explosion outside the ice cream parlour shows a busy downtown area, with cars driving down the street when a massive blast strikes. Then a huge fireball engulfs a building, forcing the cars to scramble to get away. Videos of the attack posted on social media show wounded and bloodied people crying for help on the road outside the ice cream shop.
Karrada was hit by a massive Isis truck bomb in July 2016 that killed at least 324 people, the deadliest attack in Iraq since the US-led invasion of the country in 2003.
Isis claimed the attack in Karrada, a mainly Shia district, through its Amaq news agency.
"Isis terrorists tonight in Baghdad target children and families enjoying time together at an ice cream shop," Brett McGurk, the US special envoy to the anti-Isis coalition tweeted.
"We stand with Iraq against this evil."
The terrorist group has called on its supporters to wage "all-out war" during Ramadan. Ramadan has previously seen a spike in Isis terror attacks. Last year, the US State Department warned that a “call to martyrdom during the month may hold a special allure to some”.
The hardline Sunni group, which declared a "caliphate" over parts of Syria and Iraq in 2014, has been retreating in Iraq since the end of 2015 in the face of US-backed government forces and Iranian-backed Shia paramilitary groups. It is now besieged in an enclave in the northern city of Mosul, which it has used as its de facto capital in Iraq.