TUNIS // "Jihad is not a crime" was blazed across the front of T-shirts two young men were hawking along the main avenue of the Tunisian capital.
Around them flowed the annual Martyrs' Day parades, including small children dressed in the outfits often adopted by extremist religious fighters: headbands with Islamic phrases and automatic weapons, albeit plastic ones.
"Jihad is a duty in Islam," Marwan, 15, one of the shirt sellers, said this week. "The Prophet has said, if one foot of the land of the Muslims has been touched, then the doors of jihad must be opened." By that morning, he had already sold 20 shirts at 20 dinars (Dh46) apiece.
An elected, Islamist-led government has tried to stem a stream of young, religious Tunisian men joining the conflict in Syria and becoming part of networks of North African extremists.
But they have been struggling against a popular feeling that jihad, in the sense of a righteous war, is a heroic and holy endeavour when performed in countries such as Syria and Mali.
"My friend Wejdi, who lived near here, he went to Syria four months ago. He is 18 years old," said Marwan. "I think it's really lucky for him, because anyone who dies a martyr, that's a great opportunity for him." Those who die in a holy war are blessed, he said, and their bodies do not decay.
Since a popular uprising overthrew the autocratic but secularist president two years ago, such views have become more frequently aired. Legislation known as the Counterterrorism Law, passed in 2003 and used, according to Human Rights Watch, to prosecute more than 1,000 people under an "excessively broad" definition of terrorism, has not been implemented as stringently and many people held under it have been released.
But as well as moderate Islamists, the new government released many hardline clerics and former radical fighters. The most prominent of these, Saifullah Ben Hassine, known as Abu Ayyad Al Tunisi, was in Afghanistan and helped found the Tunisian Combatant Group, listed by the UN as a terrorist organisation in 2002. He now leads the Ansar Al Sharia extremist group and although wanted for his role in an attack last year on the US Embassy, has not been arrested.
As Mr Ben Hassine and others like him operate more freely, there has been a shift towards more radical rhetoric from imams and teachers in mosques. One imam in the upscale Manara area, who did not want to give his name, explained that although the concept of jihad, or struggle, can take many forms, the greatest form is that of fighting in a war
"It's the highest rank of jihad," he said, "and all the prophets did it."
In Syria, the forces of President Bashar Al Assad, whose fellow followers of the Alawite branch of Islam forms the bedrock of his support, have battled a largely Sunni and increasingly fundamentalist rebellion fornearly two years. The regime, said the imam, "is well known for not having any religion in it".
"The president is literally God, and it's not a peaceful system, it's a system that fights and kills its people and you can see its crimes with your own eyes."
Syrians are obliged to fight Mr Al Assad's forces, "and it's an obligation on the Islamic population out of the principle of brotherhood to fight against the system and not let them do it alone", he added.
He, and other imams, have stopped short of instructing young men who seek their advice to go and fight in Syria, it still being illegal to advocate violence in Tunisia. But his words are not exactly discouraging, either.
Hundreds of Tunisians have joined the fighting so far, the Syrian opposition leader Moaz Al Khatib told Tunisian president Moncef Marzouki at a meeting in Qatar last month.
They have also been involved in Islamist violence across North Africa. Tunisians formed more than a third of the band of militants who overran the oil and gas installation at In Amenas in Algeria earlier this year, in which 39 hostages were killed. A report published last week by the United Nations detailed weapons shipments passing from Libya to Algeria through southern Tunisia. Residents interviewed in Mali earlier have said there were Tunisians among the mishmash of Islamist groups that took over the north of the country in 2012.
Tunisia's government has taken some measures to stop young men going abroad to fight. The state news agency reported earlier this month that the Ras Jedir border crossing with Libya had been closed to men under the age of 35 without commercial business in Libya.
But when asked about the subject in an interview last month with the France24 television channel, Prime Minister Ali Larayedh said there was little he could do to prevent people from going to fight outside Tunisia. While there are men travelling to Turkey, Libya and other countries under false pretexts, he said that without specific intelligence, "we can't prevent them from leaving the country: it's the case in any democratic country".
The situation had "dangers", he said, especially "its implication in the future when the crisis and the suffering of our Syrian brothers will come to an end". Some analysts fear that Tunisians who fight in Syria or elsewhere could come back, wield influence and encourage violence in their homeland.
This is precisely why some people go, said Said Al Jaziri, a religious teacher and leader of Al Rahma, an Islamist political party. "A lot of people have lost hope here, and they can have hope in the war," he said. Any one of the hundreds of thousands of young men, with few qualifications or prospects, face a bleak future and can be enticed with the prospect of glorious martyrdom or honourable survival, he added.
"He feels he doesn't have value," said Mr Al Jaziri. "He thinks if he goes to Syria, maybe after, he will be a leader in the country."