Militants from the Islamic State extremist group attacked an army barracks in a mountainous area north of Baghdad, killing 11 soldiers while they were sleeping, AP reported.

Officials said the attack took place in the Diyala province. The circumstances of the attack are not clear, but two officials said Islamic State militants broke into the barracks at 3 am local time and shot the soldiers dead.

The attack was one of the deadliest attacks by the Iraqi military in recent months.

Officials said army reinforcements had been sent to the village where the attack took place, and security forces had been deployed to surrounding areas.