The Islamic State group was largely defeated in the country in 2017, although it remains active through sleeper cells in many areas.
Gunmen from the so-called Islamic State (IS) extremist group attacked an army barracks in a mountainous area north of Baghdad early Friday, killing 11 soldiers as they slept, Iraqi security officials said.
The officials said the attack occurred in the Al-Azim district, an open area north of Baqouba in Diyala province. The circumstances of the attack were not immediately clear, but two officials who spoke to The Associated Press said IS militants broke into the barracks at 3 a.m. local time and shot dead the soldiers.
The officials spoke on the condition of anonymity as they weren't authorised to issue official statements.
The brazen attack more than 120 kilometres north of the capital Baghdad was one of the deadliest targeting the Iraqi military in recent months.
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.
In October, IS militants armed with machine guns raided a predominantly Shiite village in Diyala province, killing 11 civilians and wounding several others. Officials at the time said the attack occurred after the militants had kidnapped villagers and their demands for ransom were not met.
The officials said army reinforcements were sent to the village where Friday's attack occurred, and security forces deployed in surrounding areas. More details were not immediately available, and the Iraqi military did not immediately comment.