U.S. President Donald Trump just handed the Islamic State (ISIS) a literal get-out-of-jail free card. On October 6, he announced the withdrawal of U.S. forces from northeastern Syria in order to make way for a Turkish invasion. The Turks had in their sights the Kurdish forces with whom the United States partnered to topple ISIS’ territorial caliphate only seven months prior. Trump’s decision was a betrayal of these partners, whose ties to militants on the Turkish side of the border threatened Ankara. More ominously, the decision was a gift to ISIS leader Abu Bakr al-Baghdadi, and the biggest single boost to his organization since it captured a large swath of Iraq and Syria in 2014.

Remarkably, ISIS won’t even have to adjust its strategy to seize this opportunity to rebuild. It can merely reuse the playbook that enabled its initial rise: a systematic campaign of jailbreaks that yielded the manpower and the leadership necessary to conquer physical territory.

Thanks to the Trump administration, the Kurdish forces guarding Syrian prisons that contain tens of thousands of ISIS militants and their families are now fighting for their lives. The flurry of prison breaks reported in recent days isn’t just an accident of the Turkish invasion—for years, ISIS has relied on breaking its fighters out of jails and detention camps to bolster its manpower. That strategy has worked time and again, and it will likely enable ISIS to replenish its ranks, eventually allowing the organization to strike at Europe or the United States.

BREAKING THE WALLS

ISIS was not the first jihadi group to exploit weak prison security or even to employ a purposeful strategy of freeing incarcerated fighters. In 2006, scores of Islamist militants, including a former private secretary to Osama bin Laden, famously tunneled out of a prison in Sanaa, Yemen, and formed al Qaeda in the Arabian Peninsula (AQAP) soon thereafter. Since then, AQAP, which once controlled Yemen’s third-largest port and was responsible for the thwarted 2009 Christmas Day attack on a Detroit-bound Northwest Airlines flight, has broken dozens more fighters from Yemen’s creaky prison system.

Similarly, in Afghanistan, the Taliban has pulled off multiple successful prison breaks since 2008. That year, the insurgent group killed 15 guards in a brazen assault that freed 1,200 prisoners from Sarposa prison in Kandahar. Three years later, it tunneled into the same facility and freed another 500 militants. In Iraq, fighters from ISIS’ predecessor group, the Islamic State of Iraq (ISI), staged a string of daring raids to free their imprisoned comrades between 2007 and 2010. Just days after the United States handed control of the maximum-security jail facility at Camp Cropper to the Iraqi government in July 2010, four imprisoned senior ISI members disappeared, reportedly driven away during the night by the jail’s warden.

If Baghdadi didn’t invent the jailbreak strategy, he did advance it to a new level of sophistication.

But if Baghdadi, who became the leader of ISI in May 2010, didn’t invent the jailbreak strategy, he did advance it to a new level of sophistication. In an audio recording released in July 2012, he declared as the group’s “top priority” to “release the Muslim prisoners everywhere.” Over the next 12 months, during which the group began calling itself ISIS, Baghdadi ran a highly successful campaign known as Breaking the Walls, which included at least eight separate jailbreaks in Iraq that freed hundreds of senior- and mid-level ISIS militants. Among the facilities ISIS targeted were jails in Tikrit, Kirkuk, and Taji, as well as Abu Ghraib prison in Baghdad, from which it freed more than 500 fighters in July 2013. By mid-2014, ISIS was strong enough to challenge Iraqi forces for control of entire cities, including Mosul, where Baghdadi declared the creation of ISIS’s caliphate from the city’s Great Mosque in July of that year.

The Breaking the Walls strategy succeeded in part because of the security vacuum left by departing U.S. troops, who completed their drawdown from Iraq in 2011. The Iraqi military was unable to eradicate what remained of the jihadi group on its own. ISIS also exploited sectarian tensions in Iraq to bolster its popular support, which in turn helped it recruit and fund-raise. In addition, the group was able to retreat to safe havens in Syria, from where it launched cross-border operations. In short, ISIS’s jailbreak strategy was designed to exploit many of the same conditions that exist in northeastern Syria today, following the U.S. withdrawal and the subsequent Turkish invasion.

UNGUARDED PRISONS

According to the U.S. Department of Defense, the Syrian Democratic Forces (SDF), Washington’s main Kurdish partner prior to the abrupt U.S. withdrawal, holds at least 10,000 ISIS fighters in prisons or “pop-up prisons” in northeastern Syria. Among the prisoners are some 2,000 foreign fighters from around the world. In addition, the SDF holds roughly 70,000 ISIS family members and supporters at a squalid camp in the town of al Hol. The conditions are so poor in this camp, and the security there is so thin, that ISIS ideology is able to spread “uncontested,” according to the Pentagon. Like the Iraqi prisons from which ISIS initially emerged, the Kurdish-run detention facilities have become incubators of the next generation of extremist fighters and sympathizers. Two-thirds of al Hol residents are under the age of 12; many of them will be ISIS’s reinforcements in the next round of fighting.

The SDF is now stretched to the breaking point as a result of the Turkish invasion. Absent American protection, the Kurdish forces are hopelessly outmanned and outgunned. Every SDF fighter guarding captured ISIS militants is a fighter not on the frontlines repelling the Turkish invaders. While the SDF rush men and materiel to the border, they leave the prisons and camps unattended or minimally guarded. Manning these facilities is now a “second priority,” General Mazloum Kobani, commander of the SDF, told reporters last week.

Every SDF fighter guarding captured ISIS militants is a fighter not on the frontlines repelling the Turkish invaders.

It is no surprise, then, that new prison breaks are reported almost daily: at least five prisoners escaped from an ISIS jail near Qamishli on October 11; an estimated 800 ISIS detainees escaped from a camp called Ain Issa two days later, after the guards reportedly left their posts to fight; and two Belgian ISIS fighters broke free from another prison, although Belgian officials have said little about the circumstances of their escape. ISIS is undoubtedly working to exploit the chaos and insecurity to free more of its fighters. Even before the Turkish invasion, the Pentagon reported that the group was likely recruiting in the Kurdish-run camps. And in his most recent audio recording, released on September 16, Baghdadi once again urged his men to free prisoners from the “camps of diaspora and prisons of humiliation.”

STRIKING THE FAR ENEMY—AGAIN

ISIS remains intent on projecting power beyond its stronghold in Iraq and Syria. As its ranks swell with newly freed fighters, the group will almost certainly attempt a large-scale foreign operation similar to the deadly attacks it carried out in France, Belgium, and Turkey in 2015 and 2016. ISIS hasn’t launched a major attack in Europe since well before it lost its last territorial foothold in March. Still, it has targeted Shiite wedding-goers in Afghanistan in August, claimed responsibility for the slaughter of 258 Easter worshippers in Sri Lanka, and most recently targeted Shiite pilgrims in a September minibus bombing in the Iraqi city of Karbala. Once the group gains a new foothold in the chaos of northeastern Syria, protected from American air power by Damascus and Moscow, the countdown to another foreign attack will begin.

By abruptly withdrawing from Syria, the United States has undercut its allies, empowered its enemies, and breathed new life into ISIS. Astonishingly, the Trump administration reportedly has no contingency plan for dealing with the hundreds of ISIS fighters who are already spilling out of the Kurdish-run jails—and the thousands who are likely to follow. Turkey won’t take over the vulnerable detention facilities because they are outside the area that Ankara supposedly plans to occupy, and Turkey’s Syrian allies, including the Free Syrian Army, have already shown that they see ISIS as more of a friend than a foe. Instead of securing ISIS prisoners, these forces appear to be deliberately releasing them from now-unguarded prisons.

ISIS has a battle-tested strategy to replenish its ranks and resume its fight against enemies near and far. Does the United States?