TUNIS — Mohamed Sahbeni is angry. He spits out curses as tears form in his eyes. He damns the ultra-conservative Salafist Muslims who have taken over his village of Sejnene in the north of Tunisia. He damns the recruiters for the various jihadist groups that operate there. He damns the government whose counterterrorism measures haven’t even reached his home, and he damns the imam who radicalized his hitherto religiously indifferent son, Walid, before sending him off to die in a suicide bombing in Mosul two months later.

Between curses, Mohamed spits out how Walid had everything to live for. Like his father, he was a bus driver, a good job in Tunisia. He was newly married and expecting a baby. Still, his visits to the mosque grew more regular and longer in duration. He started to grow his beard and wear the distinctive robes of the Salafist community. In February 2014, without telling anyone, he packed a small bag and left to join the jihad in Syria and Iraq.

Mohamed was only informed of his son’s death once the birth of Walid’s son had been confirmed. Mohamed remembers the timing of the call well. It was Sept. 14, 2014, the day of his daughter’s wedding.

Mohamed still blames the mosque, “I know the imam of that Mosque. I know him well. He’s a criminal. He’s a filthy scumbag…. They’re all still there. They’re still recruiting for Syria. I’ve told everyone but nobody listens. It’s like pissing in the sand.”

Around 3,000 Tunisians are thought to be fighting in Syria and Iraq, the largest per capita contribution to the conflict worldwide. According to the Tunisian government, in the two years prior to April 2015, it has prevented a further 12,490 from leaving Tunisia to join the ranks of jihad elsewhere. A Libyan Justice Ministry spokesman recently estimated the number of Tunisians engaged with jihadist groups in neighboring Libya at over 2,000. Many of those now waging holy war in distant lands first heard the call of jihad within the country’s mosques.

In Tunisia, as in the rest of the Muslim world, the national conversation is defined within the mosques. The country’s former autocrat, Zine El Abidine Ben Ali knew this well, ensuring that all imams were hired by and paid for by the Ministry of Religious Affairs, with Friday sermons drafted and distributed centrally.

Historically, religious freedoms, like so much else in Tunisia, had been brutally restricted under the Ben Ali regime. It was frustration at these limits; on conversation, on assembly — even on the right to believe — as much as it was the years of endemic government corruption that exploded onto the street in 2011. After the Arab Spring, with amnesties granted to political prisoners, many jihadists amongst them, and the unquestioning embrace of democracy, human rights and freedom of conscience, restrictions on religious belief appeared to run counter to the nature of the revolution that many had died for. And in the vacuum that followed, radical religious groups flourished.

Spurred by March’s terrorist attack on the Bardo Museum, plus mounting terrorist assaults on government forces across the country, the state is stepping up its counterattack. Drawing its focus even closer upon Tunisia’s disparate and warring religious institutions, the Ministry of Religious Affairs announced last week the creation of a central register of imams, as well as new rules to curb the activities of “Maintenance Commissions” — operations the government suspects of raising funds for militant activities elsewhere. A further crackdown on the country’s illegally built mosques (previously the  subjects of the state’s grudging tolerance, now the objects of its vengeful ire) is pushing Tunisia’s radical religious minority dangerously further to the sidelines, as mosques are closed without warning and those who preach their unsanctioned sermons open to legal censure and arrest.

But rather than stemming the exodus of Tunisia’s youth to the battlefields of jihad, the government’s current crackdown on its renegade religious institutions is — contrary to all intentions — justifying the radical sermons of those who cast the secular democratic state as the enemy of religion, pitching the Tunisian government into the unwitting role of dupe to the recruiting sergeants of jihad.

It isn’t just religion. Throughout the capital, you don’t have to go far to see evidence of the Tunisian government’s militant response to the growing terrorist threat. It’s in the police checkpoints that litter the city, the barbed wire that surrounds public building and the machine guns that sit ominously behind them. And, critically, it’s in the slow sacrifice of political and religious freedom upon the alter of security.

Hard-line preachers, both domestic and imported, have since used the power of the pulpit to establish for themselves de facto fiefdoms throughout the poorer suburbs of Tunisia’s cities that, thus far, the state’s current crackdown on extremism has shied away from. Here, their bearded followers, as often as not former petty criminals, many of them graduates of Tunisia’s prison system — notorious recruiting grounds for the advocates of Jihad — patrol the streets untroubled by government restraint and free to challenge anyone or anything they perceive to be un-Islamic.

Cite Ettadhamen, a few kilometers from the Bardo Museum, is typical. The police rarely come here, preferring to leave Salafists that dominate this community to their own devices. Zahira Jbali lives here. In October 2013, her son, Mohamed, left Tunis to join with Jabhat al Nusra in Syria. Mohamed used to pray at the nearby Uhud Mosque. Zahira remembers a good son, who spent his spare time away from the bakery where he worked crafting pottery dishes he would either give as gifts or sell on the street. Mohamed didn’t tell his mother he was leaving for Syria, preferring instead to have her believe the fiction that he was leaving for a job in a Libyan hotel. He eventually called her from Syria. Twenty days later, he called again to say that they were taking their telephones off but he would be home soon. Later that same day, around 4 p.m., an anonymous voice called to tell Zahira that her son had been ‘martyred’ by a regime tank in Aleppo.

She still doesn’t believe the news.

For Zahira, responsibility for her son’s death is clear: She blames the mosque. “After the revolution, they replaced the imam,” she said. “Now they’re all Salafists. They recruit our children for jihad. They’re the root of the problem…. On Fridays, when I did the laundry on the roof, I could hear the imam calling for people to go and support their brothers in Syria.”

Mosques, like that in Cite Etadhamen, are undeniably potent recruiting grounds for Tunisia’s jihadists. But forcing them to shut down is unlikely to provide much of a solution to the country’s growing terror challenge. Currently, the mosques are reaching out to the angry and the alienated with the promise of inclusion within an established hierarchy at home and the chance of achieving sublime glory on the divinely sanctioned battlefields of Syria, Libya and Iraq. To close the mosques without first challenging that message and addressing its core appeal is to encourage the ultimate transformation of those neighborhoods in which the mosques thrive from suburbs to emirates. Mohamed Iqbel Ben Rejeb is president of The Rescue Association of Tunisians Trapped Abroad, a voluntary organization that acts as an intermediary between the families of those who have left for jihad and the government in Tunisia. “We have several cases of children who have been directly or indirectly radicalized in the mosques,” he said. “However, closing them simply isn’t going to work. By closing the mosques we’re actually reinforcing their hate speech. We’re sending them a very clear message, ‘Watch these tyrants. They’re against Islam.’”

In areas like Cite Ettadhamen, the extremes of religion are offering an alternative to communities dogged by crime, joblessness and poverty. That these extremes have been allowed to dominate within these areas is not so much as failing of security as a fundamental failing of government.

The danger facing Tunisia is a deadly one. The threat posed by terrorist groups such as Islamic State and Tunisia’s own al-Qaeda-sponsored Okba Ibn Naffii Battalion, both of which draw their numbers from the country’s young, is genuine. On the outskirts of both cities and society, the economically, socially and politically marginalized have fervently embraced a belief system incompatible with Tunisia’s democratic rebirth, wholeheartedly believing that any system of government other than that prescribed within the Koran can have no outcome other than the tyranny of apostates and the godless. A gulf has emerged between these two Tunisias, one that cannot be bridged by the arbitrary closure by one of the other’s places of worship. Tunisia’s revolution remains a work in progress. It needs to engage with the communities it has allowed to drift and to challenge the belief system that separates them. To do otherwise is, not simply to fail the ideals of the revolution, but to further the exodus of the angry and the disaffected to the blood soaked battlefields of jihad.