The Islamic State group launched sophisticated attacks in Syria and Iraq, including an attempt to break into a prison where suspected extremists are being held by U.S.-backed fighters, officials said Friday. Dozens of detainees in Syria and 11 Iraqi troops were killed.

The separate attacks are believed to be some of the largest since IS lost the final sliver of territory it held nearly three years ago. In recent months, IS sleeper cells have become more active in both countries, claiming attacks that have killed scores of Iraqis and Syrians.

Also Read | Before pullout, watchdog warned of Afghan air force collapse

In Iraq, IS gunmen 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 the city 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, before fleeing.

Also Read | US announces $308 million in aid for Afghans as crisis grows

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.

In Syria, more than 100 IS fighters using heavy machine guns and vehicles rigged with explosives attacked the Gweiran Prison in the northeastern city of Hassakeh where some 3,000 suspected IS militants are being held, according to a spokesman for the Kurdish-led Syrian Democratic Forces, Farhad Shami. He said seven U.S.-backed Kurdish fighters were killed and several others were wounded. At least 23 IS attackers were also among the dead, he said.

Also Read | Taliban orders beheading of mannequins in Afghanistan

“This is the biggest attack not only in Syria but also in Iraq and the region,” Shami said in reference to attacks carried out by IS since they were defeated in Syria in March 2019. “The prisoners include commanders and are among the most dangerous.”

The complex attack was mounted on Thursday evening and aimed to free fighters from the group incarcerated there. Kurdish-led forces who control the Gweiran Prison said prisoners inside the facility rioted simultaneously and tried to escape while a car bomb went off outside the prison and gunmen clashed with security forces.

The fighters were led by foreign militants, not Syrians, many of whom spoke in Iraqi dialect, Shami said.

Also Read | Ashraf Ghani was given ‘no more than two minutes’ to flee Afghanistan

The SDF said more than 100 militants who escaped were arrested. Another group of inmates staged a new escape attempt Friday, the SDF added.

Shami said IS gunmen now controlled several homes in the nearby neighborhood of Zuhour adding that the extremists have rigged several homes with explosives and are using civilians as human shields.

“We are being cautious so that civilians are not harmed,” Shami told The Associated Press.

Also Read | Lahore bomb blast: Who are Baloch Nationalist Army, group claiming responsibility?

The US-led coalition carried out an airstrike after reported casualties among the Syrian-led Kurdish forces late Thursday.

Shami said dozens of IS fighters had gathered earlier in a nearby neighborhood and prepared for the attack.

A Syrian opposition war monitor had a higher death toll, saying a total of 67 people were killed.

The Britain-based Syrian Observatory for Human Rights reported at least 23 Kurdish security forces and prison guards were killed in the clashes, alongside 39 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.

IS 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 Iraq’s 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.

Also Read | In Pics: Deadly bomb blast at Anarkali market, Lahore shocks Pakistani city

IS attacks have been on the rise in recent months in both Iraq and neighboring Syria, where in 2014 the group set up a self-styled Islamic caliphate before being defeated by an international coalition.

The so-called caliphate covered significant swathes of Iraq and Syria. The ensuing war against them lasted several years, killed thousands, 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.