Gunmen from the so-called Islamic State extremist group attacked a village northeast of Baghdad, killing at least 11 civilians and wounding six others, Iraqi security officials said.
The officials said the attack occurred in the predominantly Shiite village of al-Rashad northeast of Baqouba in Diyala province.
The circumstances of the attack were not immediately clear, but two officials said Islamic State group militants had kidnapped two villagers earlier and then raided the village when their demands for ransom were not met.
Machine guns were used in the attack, they added, speaking on condition of anonymity in line with regulations.
They said all the dead and wounded were civilians.
Attacks targeting civilians have become rare in Iraq since the Islamic State group was largely defeated in the country in 2017, although it remains active through sleeper cells in many areas.
Militants from the Sunni Muslim extremist group still conduct operations, often targeting security forces, power stations and other infrastructure.
A roadside bomb attack targeted a Baghdad suburb in July, killing at least 30 people and wounding dozens of others at a crowded market.
In January, twin suicide bombings ripped through a busy market in the Iraqi capital, killing at least 32 people and wounding dozens.
Iraqi officials blamed IS for those attacks.