The slow demise of the Islamic State of Iraq and the Levant’s (ISIL) caliphate project since 2015 has proceeded to the point where it is realistic to ask the following question: What next after the caliphate? As the battle of Mosul moves slowly to its inevitable conclusion, analysts are confidently predicting the end of ISIL — complete with a “Reichstag moment” — as the group continues to hemorrhage territory, lose access to its tax and extortion base, and find less things to celebrate in its media operations.

Unlike its rise from relative obscurity, where the group made its own luck and forged its destiny with a patient strategy and competent execution of the military campaign that won it considerable territory in Syria and Iraq, ISIL’s future survival will be determined less by its own agency and more by the actions of others. This complex interaction of actors, local and foreign, with its unpredictable effects leads to a number of possible trajectories for the decade-old movement that calls itself the Islamic State.

A Durable Disorder

In the pantheon of possibilities ranging from complete collapse to a future resurgence, the organization will likely survive its looming military defeat. This outcome is supported by historical research on insurgencies that indicate groups rarely collapse and disappear. In fact, like the past history of ISIL itself, groups are quite capable of withstanding the loss of territory by returning to earlier stages of organizing, recruiting and fund raising. While ISIL has been fixated with securing and controlling sympathetic populations in the past, it has demonstrated a remarkable ability to survive without territory, as it did between 2008 and 2013. In the future, the underground struggle that follows on the heels of the conquest of Mosul and Raqqa will not require large numbers of fighters. The group’s veterans are experienced in blending back into the local population to wage a low-level insurgency.

When ISIL goes underground, its ability to raise funds will be much diminished from its current income, but it will likely be successful at bringing in money through extortion, smuggling and the taxation of the population in the areas where it remains active. Its attacks may be less spectacular, but it will still be able to conduct hit-and-run attacks (including suicide operations), ambushes, assassinations and sniper attacks. It will also lean heavily on the use of improvised explosive devices, as demonstrated in areas far away from the focus on Mosul. Reconstituting an effective insurgency will be difficult for ISIL this time around, and its fighters will need to calibrate the proper balance between protecting the population it claims to represent and engaging in predatory actions to finance its operations. There is also the possibility of splinter groups emerging, and infighting between pockets of leadership looking to consolidate control.

One major problem for the Islamic State will be the protection of its foreign fighters that emigrated to the caliphate. Its current leadership lived through the previous defeat in Iraq in 2007, which demonstrated the loss of territory had a negative impact on the Islamic State of Iraq’s ability to safeguard its foreign fighters, and the group began to turn away these fighters. Today, the surplus of these foreign fighters, a not insignificant portion of ISIL manpower, will be a huge liability in the shrinking caliphate. As scholar Daniel Byman has noted, a sizeable proportion of those foreign fighters who have traveled to Iraq and Syria will never be able to return home, although some may attempt to sneak into Europe. Many will remain in the Middle East. Those who stay will be easy targets for rival recruitment, bounty hunters and security services.

Yet there is no reason to think ISIL is close to being vanquished. The two major factors that led its predecessor, the Islamic State in Iraq, to resuscitate its organization and evolve into a truly global threat — the Syrian civil war and the political manipulation of sectarian tensions in Iraq — remain important variables in what comes next. RAND research that examined all insurgencies between 1945 and 2009 found that the most important factor in reducing their duration is the ability of the counterinsurgents to reduce the tangible support of the insurgents. To achieve this, state security services, police forces and border control are critical, and neither Iraq nor Syria can currently claim to have any of these in abundance or quality.

ISIL is fighting fiercely in Mosul, using suicide attacks at an industrial level, according to Kings College researcher Charlie Winter, who counted more than 900 suicide operations in the campaign. Most of the perpetrators were local Iraqis – recent volunteers influenced by ISIL control of their city. Even after the fighting dies down, ISIL will wait patiently for opportunities to strike, all the while allowing the militants who remain in Iraq and Syria to rest, recuperate and rearm. The group has already begun moving leaders out of Raqqa, presumably so that they will be in place to lead the next manifestation of the group. And while U.S. backed forces have made progress in retaking territory from ISIL, including several neighborhoods in the Taqba area of Syria, extremists have successfully re-infiltrated areas in Iraq, including Diyala Province, where ISIL has deployed sleeper cells.

It can continue operating on a shoestring budget, much like al-Qaida did throughout the 2000s, and it can remain active in the virtual sphere through its media and propaganda operations.

ISIL will continue to benefit from the instability in Syria, just another actor floating in a swamp of durable disorder. It remains highly unlikely that the Assad regime will be able to project a monopoly of force any time soon over the Sunni heartlands of eastern Syria. This leaves ISIL as one of very few groups willing and able to provide even a modicum of services to the Sunni population in the area. Satisfied with retaking its major urban centers, the anti-ISIL coalition will most likely find itself challenged by administering to the wasteland that used to be the caliphate. Based on this culmination point, we examined the potential actions of three parts of the coalition — area locals, state governments and the foreign interventionists — to ascertain the factors that will greatly impact the likely trajectories of ISIL’s future.

Who Governs the Sunnis?

This political question has been at the heart of the conflict since the U.S. military conducted a surge of troops and diplomats that opened the door for rapprochement between Sunni-dominated areas of Iraq and the national government in 2007. This relationship, which at one point held real promise, failed to develop and since 2010 ISIL opportunistically capitalized on its slow deterioration. By 2014, Iraqis in the Sunni majority areas gave a lukewarm embrace of ISIL that was as much of an indictment of the inept and corrupt Iraqi Sunni political class as it was of the Maliki administration’s loss of perceived legitimacy and right to rule.

Now that Sunnis have learned the hard way that ISIL’s utopian revolution overpromised and under delivered, who will fill the vacuum? The strong organizational structure of the Iraqi Islamic Party that ruled many of the Sunni provinces failed to translate into good governance, creating the opening for ISIL to offer itself as a viable alternative. The hardliners within the broader Sunni political establishment’s attempt to return to power after its previous failures (including the embarrassing loss of Mosul) — coupled with its historical anti-western attitude — means it will be a poor partner for the Iraqi government. Still, as researcher Rasha Al Aqeedi points out, issues including corruption, mistrust in local and central politics and radical ideologies all remain major obstacles to good governance in Iraq — even more so than the conventional wisdom that Sunni rejection of a Shiite order was the primary factor leading to ISIL’s resurrection throughout the most volatile parts of the country.

One difficult challenge in wooing Sunni politicos has been ISIL’s long-time tactic of preemption and elimination of future Sunni rivals. Starting with the dismantling of the Sahwa in Iraq, local Sunni tribal militias, and the cooption of tribal figures after 2008, ISIL’s use of calibrated violence against its own population has crippled local leaders and torn apart the social fabric— possibly permanently. Nonetheless, if regional Sunni actors can inspire the resurrection of a functioning local governance structure supported and protected by powerful benefactors ISIL will find it difficult to compete anywhere outside of the rump of the remaining caliphate.

Suzerainty or Sovereignty?

The answer to this question differs on both sides of the Syrian-Iraqi border. In Iraq, the current government led by Prime Minister Haider al-Abadi is cognizant of the need to restrain certain elements of the popular mobilization forces, especially after early controversies and allegations of atrocities in Tikrit in 2015. But restraining this collection of diverse militias indefinitely will be difficult, even though their relative absence from the battlefield has robbed them of political clout and much-desired prestige. The militias seem to be playing the waiting game, and one benefit from their lack of a starring role in the liberation of Mosul is that government forces will be exhausted, possibly even decimated, by the end of the campaign — while the militias will not be.

Furthermore, the overreliance on Iraqi counter-terrorism and special police forces as regular infantry in the fierce, door-to-door urban combat of Mosul is destroying the very capability the Iraqi state will need to win the occupation phase for a successful transition to stability, whatever form that might take. Who will fill that security vacuum? If by default the Iraqi government is forced to rely on its ad-hoc mix of popular mobilization forces, ISIL’s chances of a return in Iraq will be much higher due to its lack of legitimacy in Sunni areas. The legitimacy of the Abadi administration has been an underappreciated aspect of Iraq’s success against ISIL. This political mandate must be carried forward if the defeat of ISIL is to be a permanent one, and impending robust challenges by Abadi rivals — including former Prime Minister Nouri al-Maliki and the populist Muqtada al-Sadr — could sour Washington on future cooperation if either of these two attain power.

In Syria, the Assad regime’s chances of reclaiming territory in former rebel-held areas are much more suspect than its counterparts in Iraq, and surprisingly more complex due to the sheer number of actors in Syria with differing political end states. Any ISIL retreat east to its remaining rump state along the Euphrates will likely open up a fierce competition for resources and influence between tribes, jihadi groups, rebel groups, the state, and state-aligned proxy forces. Unlike in Iraq, ISIL has been an outsider with limited ties in Syria, although those relationships have grown stronger as ISIL has controlled territory and influenced populations. ISIL success since 2013 in exploiting divisions and stealing away fighters demonstrates how conducive this environment is group survival, and for this reason it will remain an influential entity for some time to come.

External Actors and Regional Powers

The gradual introduction of major interventionists in the conflict has arguably made it worse from every angle—from escalation risk to humanitarian catastrophes. However, in its limited goal of reducing ISIL, the intervention has produced tangible results, as evidenced by the vast amount of territory reclaimed from the group. ISIL’s future will largely be affected by whether the United States commits to a long-term partnership with whatever survives of the regional anti-ISIL coalition, and works to increase its intelligence-sharing, support for detainment screening, and large-area surveillance of rural regions. Most importantly, the U.S. military needs to improve its training, equipping and advising of indigenous security forces. If the United States fails to learn from its previous disengagement from the area, ISIL’s cultivators will find fertile land to till as it seeks to persuade locals straddling both sides of the Syrian-Iraqi border that the jihadists are the only force willing and capable of defending Sunni interests.

The idea of protecting Sunnis from external actors is one ISIL uses frequently in its propaganda as a reference to the substantial influence of Iran in both Syria and Iraq, a factor that is real and one that has been skillfully done, albeit with substantial cost to Iran. With both the Assad government and the Iraqi government in good stead in 2017, Iran could reduce its overt role in the future to avoid a backlash effect by local Sunni populations with malleable loyalties. Long targeted by jihadist groups in the Syrian milieu, evolving jihadi relationships and strategic views on Iran could possibly frustrate Iran’s calculations with increased jihadist inspired attacks on Iran’s homelands – something ISIL and others have avoided to date. This in turn could reinvigorate Iranian actions in Syria and Iraq, and validate ISIL propaganda that paints both governments as Iranian proxies. This same dynamic could also bedevil the careful Russian involvement in Syria, with attacks at home pushing the reluctant Russians deeper into a fight with jihadists — one they have been trying to avoid.

The challenge in Raqqa and the rest of eastern Syria will be the growing Kurdish-Arab and Kurdish-Turkish tensions. If the Kurdistan Workers’ Party aligned with Syrian Democratic Forces becomes involved in liberating urban areas, these tensions will likely erupt. Moreover, the Turks will likely never accede to a People’s Protection Unit (YPG) role in governance and the Kurdish militias could have trouble giving back what territory they are able to conquer. Despite being among the most effective fighting forces on the ground, will the Kurds eventually be jettisoned as an ally in favor of maintaining positive relations with Turkey? The United States finds itself in a precarious position, seeking at once to placate its NATO ally Turkey, while simultaneously reassuring the Kurds their hard fought gains are not just fleeting.

In late April, tensions reached an apex after Turkish warplanes bombed Kurdish fighters in Iraq and Syria. YPG fighters were the intended targets, although Peshmerga troops were also mistakenly hit on Mount Sinjar in northwestern Iraq. Turkey’s President Recep Tayyip Erdogan is now insinuating that the Turkish military could play a significant role in retaking Raqqa from ISIL, obviating the need for further American reliance on Kurdish militants. Some analysts have speculated that Turkey could launch the operation before Erdogan meets with President Trump at the White House on May 16 and 17. Any Turkish move without American approval would immediately deepen what has been a steadily growing rift between Ankara and Washington.

What’s next?

As it has done since its origins in Iraq over a decade ago, ISIL will once again adapt, evolve and survive. But the important question of how influential it will be in the future is anyone’s guess. ISIL’s current generation of fighters reestablished its security, intelligence and financial infrastructure in Mosul after the U.S. withdrew in 2010 and would be able to do the same today if the conditions are supportive, transitioning from semi-conventional operations to clandestine actions focusing on exploiting Sunni disenfranchisement, revitalizing familiar networks, testing governance in certain areas, and expanding shadow governance where possible. The veterans in ISIL have always prepared for this eventuality; in an audio message from May 2016, ISIL’s now-deceased public spokesman, Abu Muhammad al-Adnani, gave a brief history of the ebb and flow of the organization’s history and warned that any future reversion to guerilla insurgency would not end the movement, but merely be one step in the journey. Adnani is being honest here: the caliphate is crumbling. Unless the members of the anti-ISIL coalition are able to reduce the many possibilities presented here that might give the down and out members of ISIL a reason to fight on, this pestilence will continue to contribute to a persistent disorder in the region that has proven to be contagious and resilient.

Colin P. Clarke is a political scientist at the nonprofit RAND Corporation and the author of “Terrorism, Inc.: The Financing of Terrorism, Insurgency, and Irregular Warfare.” Craig Whiteside is a professor at the Naval War College Monterey, and teaches national security affairs at the Naval Postgraduate School Both are associate fellows at the International Centre for Counter Terrorism (ICCT) – The Hague. Disclaimer: The observations made in this article are original to the authors and do not reflect the views of the Department of Defense.

Image: Mstyslav Chernov, CC