Militants opened fire and later blew themselves up in the Iraqi city of Tikrit, killing at least 31 people in an attack claimed Wednesday by the Islamic State group.
Police and army officers said that the attack, which began on Tuesday night, also wounded at least 42 people.
A police lieutenant colonel said three militants shot dead three policemen in central Tikrit and then opened fire on civilians, before later blowing themselves up inside homes in the area.
IS issued a statement claiming the attack, saying it was carried out by seven militants who clashed with security forces until they ran out of ammunition and then detonated explosive belts.
IS seized Tikrit during a lightning offensive that overran large areas north and west of Baghdad in the summer of 2014, but Iraqi forces recaptured it the following year.
Iraqi forces are now battling to retake west Mosul -- the country's last city in which the jihadists hold significant ground.
But the jihadists still hold other areas in western Iraq and eastern Syria, and they will remain able to carry out deadly bombings even if all areas under their control are recaptured.