Islamic State militants advanced on the Iraqi town of Qara Tappa on Monday disguised as Kurdish peshmerga fighters, Kurdish security sources said.
They seized two Kurdish villages after surprising the Kurdish fighters before launching the attack on Qara Tappa, 120 km (75 miles) north of Baghdad, seeking to expand their territory and heap pressure on Kurdish forces in disputed areas.
"The terrorists were wearing peshmerga uniforms and this tactic helped them to easily infiltrate our defences near Qara Tappa," a peshmerga officer said on condition of anonymity.
Reinforcements were sent from the Kurdish-controlled city of Khanaqin to repel the insurgents and prevent the town of Qara Tappa from falling, the sources said.
Qara Tappa is a mixed area of Sunni Arabs, Kurds and Turkmen that came under Kurdish control when Iraqi Kurds took advantage of the fall of much of northern Iraq's Sunni territories to Islamic State fighters in June to expand their own boundaries.
However, in early August, Islamic State mounted an offensive against the Kurds and came within miles of the Kurdistan region's capital Arbil before U.S. air strikes forced them back.
The Kurdish security officers and residents said the militants approached Qara Tappa from the nearby towns of Saadiya and Jalawla, which they had already wrested from Kurdish control.
Peshmerga officers and medical officials said at least 15 people were killed, including seven peshmerga fighters and eight residents.
Elsewhere, a suicide bomber killed 11 and wounded 28 others inside a Shi'ite Muslim mosque, where people were attending a prayer service, in central Baghdad, a police officer and medical official said.
Five car bombs also exploded in the Shi'ite shrine city of Kerbala, killing three people and wounding 27, a security official said.