A massive bombing by the Islamic State group outside a popular ice cream parlour in central Baghdad and a rush-hour car bomb in another central area have killed at least 31 people, officials said.
Later in the day, more bombings in and around the Iraqi capital killed seven more people.
The attacks came as IS militants steadily lose 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 distract attention from their losses.
The night-time attack outside the ice cream parlour in the bustling Karrada neighbourhood killed 17 people and wounded 32, police and health officials said.
A closed-circuit camera captured the moment of the explosion, showing a busy avenue with cars driving down the street when the blast strikes.
A huge fireball engulfs a building, causing cars to scramble to get away. Other videos of the attack posted on social media show wounded and bloodied people crying for help on the pavement 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 the busy Shawaka area, killing 14, a police officer said. At least 37 people were wounded, he added.
In separate online statements, IS claimed the two attacks, saying its suicide bombers targeted gatherings of Shiites.
Seven more people died and 19 were wounded in four separate bombings in and around Baghdad, officials said.
The attacks targeted commercial areas and a patrol of Sunni anti-IS tribal fighters, they said.
The attacks came days into the holy month of Ramadan when Muslims fast during daylight hours.
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 IS.