The killing of a senior Algerian militant by special forces soon after he slipped into Tunisia has raised concern that al Qaeda is trying to regroup in the North African state as rival Islamic State has suffered major setbacks, security sources say.

Last month, Tunisian special forces killed Bilel Kobi, a top aide to Abdelmalek Droukdel, better known as Abu Musab Abdul Wadud, the leader of al Qaeda in the Islamic Maghreb (AQIM), in a mountainous region along the Tunisian-Algerian border.

Kobi was on an apparent mission to reunite splinter groups of al Qaeda fighters in Tunisia, putting the army on alert for more infiltrations, a senior Tunisian security source said.

AQIM was the dominant jihadist force in North Africa, staging several high-profile deadly attacks until 2013 when it fractured as many militants flocked to the more extremist Islamic State as it seized territory in Iraq, Syria and Libya.

IS became a major recruiter for disaffected, often unemployed young men especially from Tunisia, where poverty has spread since the uprising that toppled Zine El-Abidine Ben Ali in 2011 and induced protracted turmoil.

But Islamic State’s appeal has waned since it lost all its territorial strongholds in neighboring Libya as well as in Iraq and Syria to counter-offensives by security forces, with fighters returning home or looking for new causes to join.

That has prompted AQIM to try to lure new talent from among IS veterans, two Tunisian security sources told Reuters.

“Al Qaeda wants to invest in a recent decline of Islamic State to reorganize and re-emerge as it seeks to restructure especially in Algeria, Libya and Tunisia by naming new local leaders on the ground,” one of the security sources said.

Kobi was not the only senior militant sent to reorganize al Qaeda in Tunisia. Hamza al-Nimr, an Algerian who joined al Qaeda in 2003, was dispatched to lead a cell in Tunisia but was killed with Kobi in the same operation, Tunisian security sources say.

Beefed up by Western countries, Tunisia’s security forces have managed to pre-empt any major attack since an IS militant shot dead 39 foreigners on a Mediterranean beach in June 2015, but authorities remain on alert.

In December the United Arab Emirates briefly banned Tunisian women from boarding flights to Dubai over a perceived Islamist threat.

Hundreds of Tunisians have joined jihadist groups abroad but it is unclear how many have returned as significant numbers of them were killed in Syria combat and elsewhere, officials say.

LIBYA

AQIM has remained active in North Africa’s largely desert and often scarcely governed Sahel region, such as in Mali where it focused its activities after Islamic State emerged in force to the north in Libya and Tunisia.

AQIM’s Tunisian branch, called Okba Ibn Nafaa, is fractured into four groups based in the remote, northwestern Kasserine and Kef mountains region near Algeria.

Their command structure is dominated by Algerians while a rival group loosely associated with Islamic State based in the same region is run by Tunisians, Tunisian security sources say.

Kobi, among others before, had been sent to bring the al Qaeda spinoff groupings back together, they said.

“Okba has dozens of fighters; each group is comprised of up to 20 terrorists,” one Tunisian source said.

Okba had targeted police and army forces, he said, unlike the IS focus on killing civilians, such as on the Sousse beach.

Tunisia is monitoring the border in close cooperation with Algeria, which prides itself in having prevented any attack since a veteran AQIM commander, Mokhtar Belmokhtar, claimed a strike on a desert natural gas plant in 2013.

There are indications of AQIM fighters trying to cross into Tunisia as Algeria’s army has cracked down on AQIM in the past two weeks, killing eight militants east of the capital Algiers and then the group’s media chief a few days later.

“AQIM is in decline (in Algeria), it can’t restructure or redeploy here,” an Algerian security source said.

But a Tunisian security source said a regional AQIM commander remained in eastern Algeria intent on revamping the organization across North Africa, not just in Tunisia.