A spate of attacks that killed 82 people in Iraq overshadowed preparations on Friday to mark the end of the holy month of Ramadan, amid warnings insurgents would look to carry out deadly strikes.

The violence, the worst in more than three weeks, hit 15 cities across the country and left 270 people wounded on Thursday, just days before the Eid festival that is set to begin on Sunday.

The attacks brought the number of dead nationwide over the course of Ramadan, which began on July 18, to 404, according to an AFP tally. There has been at least one bombing or shooting on every day of the holy month but one.

Thursday’s deadliest violence struck in and around Baghdad, where at least 54 people were killed in a series of attacks throughout the day, security and medical officials said. Blasts and shootings also took place in the south, west and north of Iraq.

In the east Baghdad neighbourhood of Zafraniyah, a roadside bomb went off outside an ice cream parlour late on Thursday evening, killing four people and wounding 11. A subsequent car bomb nearby killed 22 more and left 30 wounded.

Also in the evening, an explosion in Sadr City, in the capital’s north, killed 11 people and wounded 46, while a morning car bomb in Husseiniyah, also in north Baghdad, killed six and wounded 32.

All three neighbourhoods are predominantly Shia.

Meanwhile, gunmen armed with silenced weapons opened fire on a checkpoint in the town of Massud, on Baghdad’s northern outskirts, killing 10 soldiers and wounding 10, security and medical officials said.

In the same area, a car bomb in the town of Taji killed one person and wounded six.

There were also attacks in Tal Afar, Mosul, Kirkuk, Daquq, Dibis, Kut, Al-Garma, Al-Baaj, Badush, Tuz Khurmatu, Khales and Baquba.

A series of attacks in Kirkuk province, north of Baghdad, killed nine people.

In the town of Daquq, a suicide attacker blew himself up at an anti-terrorism department compound, while in Kirkuk itself at least four car bombs were set off across the city — including two at the offices of the state-owned North Oil Company.

“I came to investigate one of the attacks near the company compound,” said police Colonel Abdullah Kadhim, head of Kirkuk city’s sniffer dog unit.

“Suddenly, another bomb went off near me, and it damaged lots of cars and company property inside the parking lot.”

Kadhim suffered wounds to his leg.

The attacks in the two cities left eight dead and 56 wounded overall.

Also in Kirkuk province, two bombings near the home of a police captain in the town of Dibis killed his brother and wounded four other people, including the captain himself, police and a doctor said.

In northern town of Tal Afar, a suicide bomber wearing an explosives belt killed six people and wounded 10 , officials said.

In Kut, 160 kilometres (100 miles) south of Baghdad, a car bomb exploded on Thursday evening, police Colonel Dhargham al-Assadi said. Six people were killed and 37 wounded, a medic said.

Attacks in Al-Garma, Al-Baaj, Badush, Tuz Khurmatu, Mosul, Taji, Khales and Baquba, left seven dead and dozens wounded.

On Wednesday, 13 people were killed in attacks north of Baghdad.

On Monday, British security firm AKE Group warned that “terrorists in Iraq may be planning mass casualty explosive attacks against large gatherings of civilians to mark the end of Ramadan later this week”.

“We haven’t received any specific intelligence on the matter but they (insurgents) may be ‘saving up’ their willing bombers for the closing period of the month, due around 17-18 August,” AKE analyst John Drake said.

Official figures put the number of people killed in attacks in July at 325, the highest monthly death toll since August 2010.