The attack was launched late yesterday on villages east of the restive town of Tuz Khurmatu, which lies in an ethnically mixed area 160 kilometres north of Baghdad.
The ensuing clashes killed 15 members of the police, of a Turkmen paramilitary organisation and of the Kurdish peshmerga.
"Twelve people, six members of the police and six of the Hashed al-Turkmani were killed in the fighting against Daesh (IS)," said Abu Ridha al-Najjar, the local leader of the Turkmen group.
The Hashed al-Turkmani is a local branch of the Hashed al-Shaabi, a national umbrella organisation dominated by Tehran-backed Shiite militias.
Also Read
In and around Tuz Khurmatu and other areas in Iraq's Turkmen heartland, Shiite Turkmen fighters belonging to these militias fight under the banner of the Hashed al-Turkmani.
Mullah Karim Shakur, a local peshmerga official, said three Kurdish fighters were also killed in the fighting.
The attack was claimed by IS in an online statement. The jihadists still hold nearby areas, such as the town of Hawijah and parts of the Hamreen mountain range.
The town has been the scene of deadly skirmishes between Shiite Turkmen and Kurdish forces in recent months.