An Islamic State car bomb killed 24 people in Baghdad's Sadr City district on Monday and the militants also attacked two police stations in the city of Samarra as Iraqi forces fought to oust the group from Mosul, its last major stronghold in Iraq.
At least four other attacks across Baghdad, some also claimed by Islamic State, killed nine more people earlier in the day, bringing the total death toll from bombings in the capital over the past three days to more than 60.
In the attacks in Samarra, about 100 km (60 miles) north of Baghdad, security sources said multiple gunmen wearing suicide vests took over two police stations, killing at least seven policemen.
The mayor of Samarra, Mahmoud Khalaf, said security forces had regained control, killing at least six assailants, but declined to comment on the number of casualties on the government side.
The pro-Islamic State news agency Amaq said the militants had executed some policemen.
The upsurge in violence comes as U.S-backed Iraqi forces try to drive Islamic State from the northern city of Mosul, where the militants are putting up fierce resistance.
Islamic State has lost most of the territory it seized in a blitz across northern and western Iraq in 2014 and ceding Mosul would probably spell the end of its self-styled caliphate. But it would still be capable of waging a guerrilla-style insurgency in Iraq and plotting or inspiring attacks on the West.
"The terrorists will attempt to attack civilians in order to make up for their losses, but we assure the Iraqi people and the world that we are able to end terrorism and shorten its life," Prime Minister Haider al-Abadi said after talks with visiting French President Francois Hollande.
Islamic State said Monday's attacks in Baghdad were revenge for "the repeated targeting of health institutions in Nineveh province" by the U.S.-led coalition backing Iraqi forces.
That was an apparent reference to two air strikes last month on hospitals in eastern Mosul, one where Iraqi forces were under attack and another which the U.S. military said had targeted militants sitting in a van. At least one of the strikes may have caused civilian casualties.
After Monday's attacks U.S. State Department spokesman John Kirkby reaffirmed Washington's commitment to support Iraq.
"These vicious acts of mass murder are a sobering reminder of the need to continue coalition operations against Daesh and to eliminate the threat this terrorist group poses," he said, using the Arabic name for the group.
Monday's blast in Sadr City hit a busy square where day laborers typically gather. Islamic State said in an online statement it had targeted Shi'ite Muslims, whom it considers apostates. Sixty-seven people were wounded in the blast.
Nine of the victims were women in a passing minibus, whose charred bodies were visible inside the burnt-out remains of the vehicle. Blood stained the ground nearby.
A parked car bomb targeting a Sunni religious figure near a mosque in western Baghdad killed five people, and another blast close to a hospital in the center killed one civilian and wounded nine, police and medical sources said.
In the southeastern Zaafraniya district, two more people were killed and seven wounded when a car bomb exploded. A bomb affixed to a vehicle in the eastern area of Baladiyat killed one person and wounded four.
A British soldier serving in the U.S.-led coalition against Islamic State was killed, the defense ministry in London said in a statement, adding that it was "not as a result of enemy activity." The statement gave no details of the incident.
Since the drive to recapture Mosul began on Oct. 17, elite forces have retaken a quarter of the city in the biggest ground operation in Iraq since the 2003 U.S.-led invasion that toppled Saddam Hussein. Abadi has said the group will be driven out of the country by April.
Clashes continued in and around Mosul on Monday. The counter-terrorism service (CTS) blew up several Islamic State car bombs before they reached their targets, and linked up with the Rapid Response forces, an elite Interior Ministry unit, said spokesman Sabah al-Numani.
CTS was also clearing North Karama district of remaining militants, the fourth area the unit has retaken in Mosul during the past week, he said.
Islamic State targeted military positions away from the main battlefield, killing at least 16 pro-government fighters and cutting a strategic road linking Mosul to Baghdad, although authorities later said they had regained control of it.