It was a Facebook posting that caught my eye – a young Tunisian man sharing his story of searching for a sense of purpose and belonging, and finding it in a mosque. But the vision of Islam he learns there is violent, and soon he is ready to step on a plane to go fight for his brothers and sisters in Iraq.

It is a familiar tale in my home country of Tunisia, which has become a pipeline for Daesh fighters. But this one ended differently. He didn’t board the plane. He became an art teacher instead. I wanted to understand how his transformation took place, in the hope that I could lead other young people down a similar path.

I met Shaheen – whose name I have changed to protect his privacy – in early 2015. Like many Tunisians, I was appalled to learn that 3,000 of my fellow citizens had fled the country to fight for Daesh in Syria and Iraq. Of the foreign fighters in Syria and Iraq, most have come from Tunisia. Decades of dictatorship, coupled with tough security policies, have not helped Tunisia address the root causes of radicalization and its broad appeal among disillusioned youth.

I thought it was high time to start listening to those who knew first-hand how young people could be enticed into violence. Maybe, with that knowledge, we could slow the flow of fighters to Daesh.

Shaheen told me how his neighborhood mosque became a source of comfort and stability after the death of his beloved grandfather. It was his grandfather who had studied Koran with him and shown him love and caring.

His grandfather’s death left Shaheen questioning the meaning of life. He was expelled from school multiple times. He had little access to books, libraries or cultural activities in his working-class neighborhood. The loss of his grandfather left a void in Shaheen’s life, and the mosque filled it. He studied Koran there, but also learned about violent jihad and met other young people preparing to fight in Iraq.

His situation is similar to many of the young people who make up about half of the population in Tunisia. The public-school system, mandatory and free for boys and girls from age six, ensures that 98% of children start school. By the time they are teenagers, however, just 75% are still there.

Shaheen’s father wanted his son to finish high school. Shaheen did not believe that education would provide him with a better future. Nearly one out of three university graduates in Tunisia are jobless, so what could he expect from a high-school certificate? Certainly not the dignified life his father was hoping for.

Nevertheless, he bowed to his father’s wishes. Back at school, he found the curriculum had changed during his three years of absence. There were new classes that appealed to his heart and mind: poetry, literature and philosophy.

One teacher in particular had a profound influence on him. She was passionate about debating with her students and enjoyed challenging their opinions. She worked with the most difficult youth in the neighborhood, but it did not stop her from engaging with them and teaching them how to think critically. Shaheen also met a new friend, a young man like himself, who loved black-metal music and read poetry.

The arts helped Shaheen to see the world differently. The day someone at the mosque whispered to him, “It is the time to prepare for jihad in Iraq”, he was no longer sure he wanted to go. The violent texts he had read, the records he had heard and the videos he had watched no longer had such a powerful effect on him.

He confided in his new friend, expecting to be shamed for thinking about taking up arms. Instead, his friend shouted: “You and I are made for another kind of jihad! What if all talented writers went to war? Who is going to fight with pens and ideas?” These words touched him. Shaheen had never thought that another form of peaceful jihad was possible. That day, he decided he was not going to war.

When we met in 2015, he told me, “If my friend had blamed me for my thoughts, I would have taken the decision to go. It is only because I was given the option that I made the right choice to stay.”

My encounter with Shaheen set me on the path of starting Mobdiun – Creative Youth. Hearing his story helped me understand how arts, culture and critical thinking are crucial to youth development and that sometimes, they can even be a barrier against radicalization.

Shaheen carried on with life, finished high school, joined an art school and became a fine arts teacher. The Salafi jihadis he knew all disappeared “behind the sun”, a euphemism for when people were caught by police during the reign of ousted president Zine El Abidine Ben Ali. The few who reached Iraq were killed.

Today, there are hundreds of young people in Tunisia feeling as lost and isolated as Shaheen was in 2003. They are prime targets for Daesh recruiters. My hope is that programmes such as Mobdiun will show them a different path.

Our objective is to think, mobilize and act to serve youth living in working-class neighborhoods like Shaheen's. Depending on what they tell us, we create a tailored program to fill the gaps they identify and do our best to meet their priorities. Our current focus is to offer an after-school free curriculum that develops their artistic talent and teaches them to use it to earn a living. Intellectuals and artists are regularly invited to speak to youth and share with them their life experiences. Mobdiun’s program is designed to develop a better sense of belonging and a stronger self-resilience.

Too often, governments reach for the reactive answer of enhancing security to prevent terrorism. A fundamental part of my work is to understand the living conditions of youth in this area and to identify the daily challenges they are facing. I believe it is crucial to listen to the people we are serving, to include them in the diagnosis we are making and to discuss the outcomes with them to make sure that the services we provide address their needs.

Shaheen helped me understand that imprisoning young people, when it is too late, isn’t the only answer. I have seen first-hand how something as simple as listening to vulnerable populations and providing tailored advice can divert young people from the path toward radicalization.