BAGHDAD (AP) -- Gunmen from the Islamic State extremist group attacked an army barracks in a mountainous area north of Baghdad early Friday, killing 11 soldiers as they slept, the Iraqi military and 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 Islamic State group militants broke into the barracks at 3 a.m. local time and shot dead the soldiers.
The officials spoke on condition of anonymity as they weren't authorized to issue official statements. An Iraqi military statement said the dead included an officer with the rank of lieutenant and 10 soldiers.
The brazen attack more than 120 kilometers (75 miles) north of the capital Baghdad was one of the deadliest targeting the Iraqi military in recent months.
It came as clashes with IS militants outside a prison in neighboring Syria continued since late Thursday. The assault on the prison holding hundreds of IS detainees and attempted escape in Kurdish-held northeastern Syria was described as the biggest on a detention facility since the extremist group's territorial defeat.
The Islamic State group was largely defeated in Iraq in 2017, and in Syria in 2019, 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.
"We affirm that the blood of the heroic martyrs will not be in vain and that the response by our heroic army units will be very harsh," the Iraqi military statement said.
IS attacks have been on the rise in recent months in both Iraq and neighboring Syria, where the group once set up a self-styled Islamic caliphate before being defeated by an international coalition.
On Thursday evening, IS militants mounted a complex attack on one of the largest detention facilities in northeast Syria to try and free fighters from the group incarcerated there.
Kurdish-led forces who control the Gweiran Prison in the city of Hassakeh, which houses about 3,000 inmates, said prisoners rioted and tried to escape while a car bomb went off outside the prison as gunmen clashed with security forces.
A spokesman for the Kurdish-led Syrian Democratic Forces, Farhad Shami, said clashes continued into Friday in the area around the prison, adding that at least two members of his force were killed and four were missing.
The fighters were led by foreign militants, not Syrians, many of whom spoke in Iraqi dialect, Shami said. So far 12 militants were confirmed killed, he added.
The SDF said 89 militants who escaped were arrested. Another group of inmates staged a new escape attempt Friday, the SDF added.
The US-led coalition carried out an airstrike after reported casualties among the Syrian-led Kurdish forces late Thursday.
The Britain-based Syrian Observatory for Human Rights reported at least 20 Kurdish security forces and prison guards were killed in the clashes, alongside six militants and five civilians. It described the attack as the most violent one committed by IS since its territorial defeat in 2019. The Observatory said the inmates are mostly in control of the prison, while Kurdish forces attempt to wrestle it back.
In 2014, IS established a self-declared Islamic caliphate that covered large parts of Iraq and Syria. The ensuing war against them lasted several years and left large parts of the two neighboring countries in ruins. It also left U.S.-allied Kurdish authorities in control of eastern and northeastern Syria, with a small presence of several hundred American forces still deployed there.