Sousse, Tunisia (CNN)Ten days after Saif Al-Deen Al Rezgui's rampage on the beach in Sousse, the Tunisian government is uncovering a terror network that reaches far beyond its borders. At the same time it is trying to rescue the country's image among tourists while striking a balance between tougher security and preserving Tunisia's democratic gains.
After Sousse, Tunisia struggles to contain jihadist groups
There are promises of greater security at resorts, tougher laws to pursue militants and the closure of "illegal" mosques. But the chaos in neighboring Libya and a thriving militant fringe in Tunisia itself are threatening to undo the gains Tunisians celebrated when they kicked off the Arab Spring four years ago.
According to authorities here, Al Rezgui trained in Libya with the two men who attacked the Bardo Museum in Tunis earlier this year, killing 22 people, most of them tourists. The local affiliate of ISIS, also known as the Islamic State, has claimed responsibility for both attacks, indicating that its training cells are to return to Tunisia, developing a network there.
The place where the men allegedly trained, near the Libyan coastal town of Sabratha, is barely 60 miles (100 kilometers) from the Tunisian border. There have been reports of several hundred jihadists receiving military training in the area, but some analysts believe the presence is much smaller, and more of a center of religious education. They also doubt that powerful militia in the area would allow ISIS to plant a deep footprint there.
There is plenty of illegal movement between the two countries across their long empty frontier, mainly among smugglers. But members of the Tunisian branch of Ansar al Shariah -- perhaps in their hundreds -- also crossed into Libya after the group was banned in Tunisia.
Ansar's relationship with ISIS is murky. Its leadership appears loyal to al Qaeda, but an unknown number of supporters have gravitated toward ISIS (as in Libya). At least one of the ISIS cell involved in attacking the Corinthia Hotel in Tripoli in January was a Tunisian.
ISIS supporters already have a footprint in Tunisia, under the banner of a group called Jund al Khilafah (Soldiers of the Caliphate), which claimed the attack on the Bardo museum in March (though Tunisian officials are still not convinced the group was responsible for the attack).
"Surely, the security of Tunisia will see horror, and surely you will see assassinations and explosions," the group claimed after the attack.
In May, a pro-jihadist media outlet in Tunisia subsequently issued this warning via Twitter: "To the Christians planning their summer vacations in Tunisia, we can't accept u in our land while your jets keep killing our Muslim Brothers in Iraq & Sham, but if u insist on coming then beware because we are preparing for u something that will make u forget #Bardo Attack .."
Jund al Khilafah is especially active in the impoverished interior. The town of Kasserine sits in the shadow of the Chambi mountains that straddle the border with Algeria. It's a neglected corner of Tunisia where most young men are without work.
Yassir, an 18-year-old who spends much of his time learning English from subtitled American movies, told CNN he tries to avoid trouble with either the police or the militants. He has stopped going to the local mosque, which has become a recruiting ground for militant groups, and wants to move to Tunis to look for work.
Yassir said well over a dozen teenagers in neighboring streets had vanished --- some into detention and others into the nearby mountains. More still had joined the hundreds traveling overland to Libya and onwards to Syria and Iraq. Jihadist recruiters sometimes offered money, he said; even modest amounts would entice young men without work.
One young man in Kasserine described to CNN a visit from one of Tunisia's most wanted men, Luqman ibn Sakhr, regarded by officials as the mastermind behind the Bardo attack.
"I knew I was either going to be killed or become a killer," he said, asking not to be identified for his own safety.
"They asked if we were still praying and I said praying had brought me nothing but trouble.
They said be ready, you're going to work for us," he said.
After that meeting, he said he had been detained by the police for a second time and questioned. He still feels unsafe, even though Sakhr was killed in March by government forces.
The craggy landscape of the Jebel Chambi ascends to nearly 2,000 meters and is covered in pine forests. People in Kasserine say it is dotted with jihadist camps, each of 30 or 40 men, often led by Algerians. The Tunisian security forces are struggling to dislodge these groups and taking heavy casualties in the process. A year ago, 15 soldiers were killed in one incident, the worst single loss of life for the military since independence in 1956.
ISIS also claimed an attack last month on military posts in the neighboring region of Sidi Bouzid, claiming to have killed or wounded more than "20 elements." And in another incident in May, a soldier opened fire in a base in Tunis, killing seven other soldiers. The defense ministry said he had been suffering psychological problems, but the attack was claimed by ISIS.
Yassir is not alone in yearning for pre-revolution Tunisia, and the authoritarian rule of Ben Ali. At least, he says, there was security -- no jihadists building camps or shooting tourists. Another local agrees, even though his two sons were shot and wounded by the security forces in protests against the previous regime in 2011.
In a CNN interview last week, Prime Minister Habib Essid acknowledged that jobless youth were vulnerable to being radicalized, or joining jihadist groups for money. His government's first goal was delivering security, and then investment. But now, he admitted, the tourism sector was "drowning." His government sees $500 million in tourism revenue being lost this year.
According to Philip Stack, North Africa analyst Verisk Maplecroft, one-third of the unemployed are young university graduates. And there is a growing divide between the elite and middle class of the northern and coastal areas and the poor of the rural and desert interior -- fertile ground for militant groups.
Stack says the Tunisian authorities also lack a good intelligence network, having long neglected the Islamist threat, and that will take time to build. But time is not a luxury the Tunisians have, given the growing activity of both Jund al Khilafah and an offshoot of al Qaeda -- known as Katibat 'Uqba ibn Nafi (KUIN). Young men join both groups, and KUIN may be stronger in the Chambi mountains.
It's unclear whether and how these groups co-operate -- or compete for recruits. Aaron Zelin, an expert on the North African jihadist scene with the Washington Institute for Near East Policy, says there is a risk the two groups will seek to outdo each other. "If ISIS attempts a full-scale terrorist or insurgent campaign in Tunisia, pressure on KUIN could mount and an outbidding scenario of escalating violence could ensue," Zelin says.
Mohsen Marzouk, head of the Nidaa Tounes Party and an adviser to President Beji Caid Essebsi, told The Independent newspaper: "Tunisia is the last wall between terrorists and Europe. If Tunisia is not able to fight (them), Europe will have to face them directly."
For now, the Tunisian government -- and the thousands depending on tourism for a living -- dread a third major attack within a matter of months. Outside the hotels in Sousse, there are now armed police. Some 2,000 have been deployed altogether at Tunisian resorts -- but Sousse alone has hotels along several kilometers of beachfront. A resort the size of Hilton Head or Torremolinos, it cannot be fully protected.
Habib, who runs a small souvenir shop opposite one of the most expensive hotels in Sousse, smiles broadly whenever a tourist enters.
'Tunisians are strong," he says. "We will fight the terror. And we will always welcome people here like they are our own families."
But he fears that another Al Rezgui, with another AK-47, will ruin him.