Three policemen and two members of the Hashed al-Shaabi paramilitary force died in an attack on a checkpoint south of the city of Tikrit, a security official told AFP, speaking on condition of anonymity.
The attack sparked a three-hour gunbattle, he said.
Some 300 kilometres (180 miles) to the east, in the Khanaqin area, the militant group fired mortars at a post held by the Asayish security force of Iraq's autonomous Kurdish region, a Kurdish official said.
An Asayish member was killed in an hour-long battle before the assailants fled, local commander Naucherwan Ahmed said.
Iraq formally declared victory against IS in late 2017, but sleeper cells have kept up hit-and-run attacks in remote areas, targeting checkpoints, public infrastructure and local officials.