Iraqi security forces inspect the scene of a bombing in Kirkuk. Twin bombs that appeared timed to lure policemen out of their fortified headquarters killed and wounded dozens of policemen. (Emad Matti/AP)

More than two dozen police officers, firefighters and security personnel were killed and nearly 100 others were injured Thursday morning in a northern Iraqi city when a bomb detonated inside a garage full of emergency personnel who had rushed to the scene of an earlier explosion.

Police and firefighters went to a garage at police headquarters in Kirkuk after reports that a bomb had gone off in a parked car. Approximately five minutes later, a second blast tore through the garage, killing at least 27 people and injuring 86 others, said Brig. Gen. Jamal Tahir, Kirkuk’s police commander.

The explosion burned at least 50 cars and heavily damaged the police headquarters building. It was one of several attacks across Iraq on Thursday, most of which appeared aimed at police officers.

A half-hour after the second blast in Kirkuk, in the same area, a police criminal-investigation commander was injured along with five other people when a roadside bomb detonated in a vehicle he was traveling in.

At midday, a booby-trapped car exploded next to a police convoy in Baqubah, about 35 miles north of Baghdad. Two civilians were killed and 10 others, including a police officer, were injured, according to a provincial spokesman.

In Baghdad, one person was killed and two others were injured when a suspected bomb detonated in the Bab Almuathem district.

The violence flared just as Iraq had appeared to be making gains in the fight against terrorism.

On Wednesday, security forces said they had captured Abu Rathwan, believed to be a key member of al-Qaeda in Iraq, and four other suspected militants in Samarra, 65 miles north of the capital. Officials said Rathwan was the military commander of an al-Qaeda organization operating out of Salahuddin province.

Also Wednesday, police officials in Kirkuk reported they had captured Muhammad Adil, who is suspected of being in charge of the al-Qaeda cell in that city.

Alwan is a special correspondent. Special correspondent Hassan al-Shammari in Baqubah contributed to this report.