IS may be scattered but it hasn't gone. Wolfram Lacher looks at Libya as part of our series exploring the question: What happens after Islamic State?

During 2016, Islamic State (IS) was obliterated as a territorial force in Libya. IS fighters have scattered in small groups in remote desert areas, or gone underground as small cells in cities. They are unlikely to again attempt to openly establish control over cities or territory since this will expose them to US or French airstrikes. They will also be unable to attract the large numbers of foreign fighters that had joined IS in its Libyan strongholds over 2015.

IS may continue to operate as a non-territorial force in Libya, both in remote areas and in cities. Foreign fighters dispersed from former Libyan IS strongholds may move into neighbouring countries, including their countries of origin – such as Tunisia, Niger or Sudan.

But in none of these countries will they find the environment that enabled IS to establish territorial control, as they did in Syria, Iraq and Libya during 2014/15. IS elements will therefore revert to a more conventional existence as jihadist groups. Whether they do so under the IS label or as al-Qaeda affiliates is largely irrelevant.

The question, then, should be what the demise of IS as a territorial force and the change in wider conflict dynamics mean for Libya’s jihadist movement more generally. Jihadism is established in Libya and deeply implanted in the social fabric of specific cities.

All the conditions are there for Libya’s jihadist movements to remain virulently active after the demise of the caliphate.

Libyan IS affiliates were but the latest manifestation of Libyan jihadism, one born out of a particular set of circumstances that do not exist anymore – IS expansion in Syria and Iraq; free movement between Libya and Syria via Libyan airports and Turkey; political and territorial divisions in Libya that opened up space for IS. All the conditions are there for Libya’s jihadist movements to remain virulently active after the demise of the caliphate.

The jihadist subculture that has developed in certain Libyan cities will sustain the flow of recruits to jihadist groups for a long time to come. In the best-case scenario, the state will remain weak; it could plausibly also remain absent from large swathes of the country.

Most importantly, ongoing conflicts continue to create opportunities for jihadist mobilisation and lead political forces to strike tactical alliances with jihadists.

Across the country, societal tolerance for jihadist movements has drastically receded as a result of the confrontations with IS in Benghazi, Sirte and elsewhere. This represents a significant change from the situation prevailing in 2012 and 2013 when the group Ansar al-Sharia operated openly amid local society.

But the pendulum is now swinging towards the other extreme. An increasing range of political and military forces are adopting the discourse promoted by Egypt’s al-Sisi and his Libyan acolyte General Khalifa Haftar.

This discourse fails to differentiate among strands of political Islam. In Benghazi, this approach led to a convergence of interests between non-ideological groups, Ansar al-Sharia and IS. If it is applied to western Libya, it will push many Islamists there closer to jihadists. A US shift towards dealing with the Muslim Brotherhood as a terrorist organisation would contribute to such a trend.

The most acute of current dangers is the eruption of open conflict in Western Libya as Haftar and his allies seek to advance in the region. War in the greater Tripoli area would likely see jihadists there emerge as a leading force in an anti-Haftar coalition, much as it happened in Benghazi.

In Tripoli, such a war would likely last even longer and be much more destructive. It would provide a jihadist recruitment ground and fighting arena for many years to come. But a similar danger lurks in the potential eruption of conflict in south-western Libya as a result of an expansion of forces allied with Haftar.