A bombing by Isil outside an ice-cream shop in central Baghdad and a rush-hour car bomb in another area has killed at least 31 people.
The attacks came as Isil militants are steadily losing more territory to US-backed Iraqi forces in the battle for Mosul, the country's second-largest city. The Sunni extremists are increasingly turning to insurgency-style terror attacks to detract from their losses.
The night-time attack outside the ice-cream parlour in the bustling Karrada neighbourhood killed 17 people and also wounded 32, police and health officials said.
A closed-circuit camera captured the moment of the explosion, the video showing a busy downtown avenue, with cars driving down the street when the blast strikes. A huge fireball then engulfs a building, forcing car drivers to scramble to get away. Other videos of the attack posted on social media show wounded and bloodied people crying for help outside the ice-cream parlour.
In the second attack, an explosives-laden car went off during rush hour near the state-run Public Pension Office in Baghdad's busy Shawaka area, killing 14, a police officer said. At least 37 people were wounded.
In separate online statements, Isil claimed responsibility for the two attacks, saying its suicide bombers targeted gatherings of Shiites.
The attacks came just days into the holy month of Ramadan when Muslims fast during daylight hours. After sundown, families break their fast and Baghdad's restaurants and cafes quickly fill up with people staying up long into the night.
During Ramadan last year, another section of Karrada was hit by a massive suicide bombing that killed almost 300 people, the deadliest single attack in the Iraqi capital in 13 years of war.
The attack was also claimed by Isil.