The Islamic State is racing to capitalize on the deteriorating security situation in northern Syria, stepping up attacks on prisons as well as on the now-weakened Kurdish militia that served as the vanguard in the U.S.-led war against the group’s self-proclaimed caliphate, intelligence officials and terrorism experts say.

Despite Thursday’s announced cease-fire, Turkey’s week-old incursion into northeast Syria is already proving to be a propaganda windfall for the extremist group, which in recent months had been making faltering attempts at a comeback in parts of eastern Syria controlled by the U.S.-backed Syrian Democratic Forces, the analysts said.

The Islamic State’s official ­media arm taunted the SDF on Thursday, calling it an abandoned American ally and warning that further attacks were coming.

“The withdrawal of the U.S. from northern Syria and the destabilization that has ensued has created a perfect situation for ISIS to capitalize on,” said Rita Katz, executive director of the SITE Intelligence Group, a private firm that tracks online extremist activity.

An editorial in the Islamic State’s al-Naba newsletter said the Kurds were only the latest of Washington’s allies to be dumped after they were no longer needed.

“Once they [Americans] attained what they sought from them, they handed them over to the Rafidha,” the essay said, “so we took vengeance on them.” Rafidha is a pejorative term used by Sunni extremists for Shiite Muslims in general, and most particularly for predominantly Shiite Iran, which was among the winners in the Trump administration’s decision to withdraw U.S. forces from Syria’s northern border region.

 Since Turkey’s Oct. 9 invasion, the terrorist group’s supporters have celebrated the release of Islamic State fighters and family members from two detention camps operated by the SDF, while claiming responsibility for attacks on other facilities. On Thursday, the Islamic State boasted of a fresh release of captives following a reported assault on an SDF base near Raqqa, the group’s former capital. That attack killed six Kurdish fighters and led to the “freeing of multiple Muslim women,” according to a statement issued by the Islamic State’s media arm. The incident was said to have occurred in Mahmudli, a village near a large refugee camp for displaced Syrians.

Pro-Islamic State social media sites are exulting over the rapid turn of events, and prominent commentators are calling for fresh attacks on prisons to free thousands of Islamist militants held by Kurdish forces. Hundreds of Islamic State family members and a handful of fighters are believed to have escaped from SDF-run detention camps amid the turmoil of the past week.

“Prison breaks are happening. The imminent return of the Islamic State is assured by the command of Allah,” one commentator declared in a pro-Islamic State forum on the social media site Telegram. The writer cited the escapes as evidence that extremist militants are “taking advantage of the war between the Kurds and the Turks.”

Turkey’s military offensive in northern Syria has triggered a spike in Islamic State attacks against the SDF, which is scrambling to defend its strongholds against an air and ground assault by Turkish troops and Turkish-backed militias. Islamic State websites reported 27 successful or attempted attacks against the SDF in the week following the invasion, compared with an average of 10 attacks over each of the previous three weeks, according to a tally by SITE.

SDF officials have acknowledged the increase in violence, which included a double suicide bombing this week at a restaurant in the border town of Qamishli that killed three people and wounded nine others.

On pro-Islamic State message boards, supporters of the terrorist group said the attacks were partial revenge for the deaths of thousands of militants and the destruction of the caliphate, which occupied nearly half of Syria before being driven to collapse by SDF fighters backed by U.S. warplanes and Special Forces operators. One anonymous post claimed that it was easier to carry out attacks because Kurdish forces are preoccupied with defending towns and villages against the Turkish forces.

“The chaos is allowing brothers to plant IEDs [roadside bombs] more freely” because there are fewer SDF fighters around to stop them, it said. A translation of the Arabic postings was provided by SITE.

While a weakened force in Syria, the Islamic State regards the eastern half of the country — including Raqqa — as “critical ground,” Katz said.

At the very least, the terrorist group appears to be seizing opportunities to project itself as vital and active, European and Middle Eastern officials said.

“They would be stupid not to exploit it and give the impression — even if it’s just an impression — that they are regaining some kind of strength,” said a European security official, who spoke on the condition of anonymity to discuss intelligence assessments.

U.S. and European intelligence officials had warned of a possible Islamic State resurgence in the aftermath of the invasion, which Turkey says is intended to prevent the border region from becoming a haven for anti-
Turkish terrorists. Turkish tanks and warplanes crossed into Syria three days after the Trump administration announced that it was withdrawing a few dozen U.S. troops and Special Forces operators from the area.

Turkey regards the SDF as an armed branch of the Kurdistan Workers’ Party, a militant group that seeks self-rule for ethnic Kurds.

The SDF was an essential U.S. ally in the fight against the caliphate and has continued to battle Islamic State cells while maintaining prisons and detention camps housing tens of thousands of fighters and their family members, many of them foreign nationals.

There has been scant information about conditions in the camps over the past week, but Kurdish officials have independently confirmed that nearly 800 people escaped from a facility for Islamic State family members in the Kurdish town of Ain Issa, a breakout that “occurred following Turkish shelling,” according to a report Tuesday by the pro-SDF Rojava Information Center.

The center said five male Islamic State fighters escaped from a second detention camp as inmates were being transferred to another facility. Their whereabouts remained unknown.

“The situation grows increasingly tense and unstable as more [Kurdish] security forces are moved to the front,” the report said. It claimed that Islamic State supporters detonated a car bomb outside a third facility in an apparent attempt to free inmates inside.

A new analysis by a Belgian think tank estimates that 12,000 Islamic State fighters and family members are in SDF custody. The latter group includes about 430 adults and 700 children from European countries, according to the report by the Egmont Royal Institute for International Relations. 

Escapees from Kurdish facilities could eventually make their way back to their home countries, said Thomas Renard, an Egmont senior research fellow.

“Some fighters will escape and others will be released,” perhaps deliberately, he said. While some may be recaptured or killed, others might follow the path of comrades who were smuggled into southern Turkey and continued to travel north.

“That some returned undetected cannot be excluded,” he said, “nor can it be excluded in the current chaos.”

Terrorism experts say the prospect of further escapes has generated particular excitement among Islamists because of the prominent role played by prisons in several of the most storied episodes in the Islamic State’s history. The terrorist group’s rise in 2013 gained momentum after militants stormed Iraq’s notorious Abu Ghraib prison in July of that year, freeing some 500 inmates, including dozens of terrorists on death row. A year later, the group controlled a swath of territory across Iraq and Syria the size of Britain.

Islamic State chief Abu Bakr al-Baghdadi spent nearly a year in Camp Bucca, a U.S. detention camp in southern Iraq that served as a kind of training and recruitment center for the terrorist group he would eventually lead.

“There’s a mythology surrounding the liberation of the Muslim inmate,” said Jesse Morton, a former extremist and co-founder of Parallel Networks, a nonprofit group that seeks to combat online radicalization. “They’re spinning it online, because prisons have always been a key part of their propaganda. What is happening now in Syria is their Camp Bucca.”