The group’s attempt to use Libya as the vanguard of its so-called “caliphate” has faltered with the decline of IS’s territorial control in the country. Yet with thousands of Tunisian and other North African IS fighters potentially looking to return home in the near future, the group’s ambitions to bolster its presence within North Africa are far from dead.

In early 2016, the Libyan city of Sirte was on the verge of becoming IS’s de facto capital outside of Iraq and Syria. However, an offensive against IS launched in May 2016 by forces aligned to Libya’s UN-backed Government of National Accord (GNA) and supported by US air strikes, eradicated the group’s presence in the citywithin eight months.

Many of IS’s fighters evacuated Sirte prior to its defeat and have scattered themselves in the surrounding area and throughout Libya. Operating as small cells, they retain the capability to attack local authorities and may damage the country’s volatile economy by targeting oil infrastructure.

Dangerous liaison: The Libya-Tunisia connection

IS fighters who fled Sirte could also cross the border into neighbouring Tunisia and join fellow affiliates attempting to establish themselves there.

The border city of Sabratha in western Libya, 60 miles from the Tunisian border, is known as a hotspot for militant activityand focal point for facilitating smuggling between the two countries. The city once contained an IS training camp in its Qasr Tahil district. This camp trainedNoureddine Chouchane, one of the Tunisians blamed for the attack on the Sousse beach resort and Tunis museum in 2015.

Despite a US air strike on the training camp in February 2016, the group’s presence in and around Sabratha has not disappeared, forcing the city’s municipal council to establish a new security force dubbed the "anti-IS Operation Room" to police the region. This move is a product of Libya’s ongoing political crisis and economic decline, where three governments, two parliaments, and a plethora of armed militias fight and jostle for power, despite ongoing political rapprochement efforts.

It is this lack of governance that provides a window for IS to regroup in certain areas of Libya, despite its territorial defeat. As such, IS's ability to linger in the area around Sabratha provides an avenue for its members to travel between Libya and Tunisia.

There are strong ties between IS fighters in Tunisia and Libya, both organisationally and at an individual level.Militantsfrom Tunisia and Libya have fought side by side across the globe since the 1980s, and were involved with IS founder Abu Musab al-Zarqawi’s networks throughout the Levant.

Tunisia is the largest single source of foreign militants fighting with IS, with as many as 6,000 Tunisian individuals fighting for the group globally. As the caliphate collapses in the Levant, many of these foreign fighters will attempt to return home to Tunisia and are likely to join up with cells sympathetic to their cause.

Many Tunisians also travelled to Libya from 2014 onwards to join the caliphate there. On 13 July, Tunisia’s Ministry of Interior issued a warrant for Hassen Dhaouadi, a suspected IS recruiter from Matier, Bizerte. Two years earlier, Libya’s Special Deterrence Force (Rada), a powerful, predominately Salafist militia based in Tripoli, reportedly arrested and held Dhaouadi. Dhaouadi, like many IS fighters in North Africa, ventured to Libya to help consolidate the group’s presence in the region but has now returned home.

Future IS vanguard in North Africa?

Tunisia provides fertile ground for an impending IS presence. IS cells are already developing their capabilities, undertaking a few deadly terrorist attacks as well as lower level insurgent strikes on Tunisian security forces. Cells sympathetic to IS are active in 17 of Tunisia’s 24 governorates that includes Sfax and Sousse on the east coast, Jendouba closer to the Algerian border, and the capital Tunis in the north.

IS has been successful in appealing to those who feel marginalised and oppressed by their government and there is an opportunity for the group to gain support by exploiting civilian dissatisfaction brewing in Tunisia. Civil unrest due to institutional corruption and new repressive security measures provide plenty of fuel for IS propaganda. The slated passing of the Protection of Security Forces Act would provide security forces with greater freedom to employ deadly force and contains a provision criminalising "denigration" of security forces.

Human right groups have stated the bill is “inconsistent with international human rights standards and the rights guaranteed in the Tunisian Constitution,” arguing it undermines the freedom of expression and could see journalists, whistleblowers, and critics of the security forces penalised. Fewer opportunities to express grievances and harsher security reforms may help push those already teetering on the edge of extremism into the arms of IS.

The loss of the city of Sirte is not the final blow to IS in Libya or the North African region. The opportunity for IS to regroup and strategically pursue its goals of causing regional instability are still available. If unchecked, the group could mount a resurgence in the region, undermining the military gains against the organisation over the last 12 months.