Politics hobbles Tunisian anti-terrorism campaign
The killing of three people at a church in France has focused attention on extremism in the suspected attacker's native Tunisia, where political instability has hobbled efforts to tackle radicalisation.
It is unclear where Brahim Aouissaoui was radicalised in Tunisia, and also whether he planned last week's deadly attack at the Nice church before or after his arrival in Europe in late September.
But the attack was a reminder that, despite improvements in security since a string of deadly jihadist operations in 2015, extremist groups continue to recruit and indoctrinate young Tunisians.
"Everyone is emphasising the security approach, without paying enough attention to prevention, which isn't yet up to scratch in Tunisia," said Moez Ali of the Union of Independent Tunisians for Freedom, part of a civil society alliance against radicalisation.
Many young Tunisians, like Aissaoui, drop out of school early and face severe economic difficulties.
Ali warned that such pressures push many to make desperate bids to reach Europe by boat -- or to join radical groups.
"We can't expect them to do anything but take the wrong path," he said, calling for efforts to made at schools and in families, youth clubs and prisons to promote a sense of belonging to society.
Aissaoui was not the first Tunisian to carry out a deadly jihadist attack in Europe.
In 2016, 31-year-old Mohamed Lahouaiej-Bouhlel ploughed a truck into a Bastille Day crowd on the Nice seafront, killing 86 people.
Later that year Anis Amri, 24, carried out a similar attack at a Berlin Christmas market, killing 12 people.
The Islamic State group claimed both men as its followers.
Mounir Ksiksi, head of Tunisia's anti-terrorism commission (CNLCT), agreed solutions had to address the root problems.
"If we want to tackle this, we have to counter the causes," he said.
'Succession of governments'
Authorities set up the anti-terrorism CNLCT team following three deadly 2015 attacks which killed 72 people, mostly foreign tourists and security personnel, and were claimed by IS.
The CNLCT is charged with coordinating anti-terrorism efforts across different government ministries.
But its efforts have been hindered by "political instability and the succession of governments", Ksiksi told AFP.
In the decade since the revolution which toppled dictator Zine El Abdine Ben Ali, Tunisia has had nine administrations, with some lasting just months.
That has made the long-term job of preventing radicalisation harder, especially given the spread of violent discourse online.
Ksiksi says mainstream religious discourse is "not attractive" as it is "weak in form and content".
That, he says, "pushes young people to hunt for alternative discourses", from underground preachers and on social media, where many outlets promote violence.
It has been heightened by growing anti-Muslim rhetoric overseas and the power of social media to quickly spread radical content, Ksiksi said.
Alaya Allani, a researcher on extremist religious movements, said Tunisia is living with the consequences of religion being used in politics, as well as a lax approach towards radical groups since 2011.
Allani criticised the impunity with which radical preachers have been able to spread their message and "excommunicate" Muslims judged too moderate, despite a constitution banning the practice and emphasising freedom of conscience.
Aouissaoui, like many jihadists, had turned from a life of violence and drug and alcohol addiction to intense religious devotion before carrying out his attack, according to people who knew him in Tunisia.
He had previously been arrested for violence and on drug charges, but had not been identified as a potential jihadist threat.
But preventing radicalisation is not just a problem for Tunisia.
Some attackers joined extremist groups after reaching European territory, according to security sources and relatives.
Amri's family, for example, said he was had not been particularly religious when he left Tunisia five years before his attack.