But critics point to the lack of rehabilitation programs and denounce a security approach that does not really address the roots of radicalization. “They simply jail them for two or three years; they are then released without any guidance. But their ideas do not change. Authorities have to create programs for detainees and do a follow-up after they are released. They have to open a dialogue with them and create social as well as economic programs to integrate them,” Abdelwahab al-Rafiqi, a former cleric and researcher known as Abu Hafs, told Al-Monitor.

According to Abdelhak Khiame, the head of the Central Bureau of Judicial Investigations (BCIJ), affiliated with the Interior Ministry, at least 1,600 Moroccans have left to join diverse groups and more recently, mainly IS. During the last two years, about 70 were arrested while coming back to Morocco.

Khalil Idrissi, a lawyer who has defended several returnees, draws attention to their motivations to return home. Many had been lured with promises of money, he told Al-Monitor, while others dreamed of living under their own interpretation of Islam and came back to their country disappointed with their experience with IS.

This zero tolerance policy on returnees has prevented many from coming back to Morocco, with some remaining in Turkey, according to sources close to Salafists Al-Monitor spoke with.

For the last two years, Moroccan authorities have been cracking down on Islamic State (IS) fighters' returning from the battlefields in Syria and Iraq. While they have been accused of turning a blind eye to the departure of hundreds of volunteers to jihad in the early days of the conflict in 2012, authorities are now arresting returnees, fearing they would get involved in terrorist activities at home.

According to Mohamed Masbah, an associate fellow at Chatham House, authorities became increasingly concerned with returnees as well as combatants trying to leave Morocco in 2014 with the rise of IS. He told Al-Monitor, “Royal Armed Forces joined the US-led anti-IS coalition forces in Iraq and Syria in September 2014. The intelligence services are a source of valuable information about transnational jihadi networks and work closely with several European countries. In addition, authorities targeted networks and cells of recruitment. This approach has prevented more than 500 prospective travelers from reaching Syria. Authorities arrested tens of presumed jihadis who pledged allegiance to Abu Bakr al-Baghdadi and/or had planned to perpetrate terrorist attacks in Morocco."

When the first wave of Moroccan combatants left to Syria and Iraq, they could easily get out of the country and travel there through Turkey. Several former detainees who had been charged with terrorism obtained travel documentation from the state and left Morocco without any difficulties, sometimes just days after being released, according to sources close to Salafi activists Al-Monitor spoke with.

But when they started to return to Morocco and as the terrorist threat increased, Moroccan authorities began to systematically arrest them. Since 2014, most of those who came back have been brought to court. In January 2015, the anti-terrorism law of 2003 was amended in order to criminalize joining groups outside Morocco. The BCIJ was created in March 2015, and has since officially dismantled more than 40 cells and arrested at least 548 people.

The first wave of departures began in 2012, at a time when the international community opposed Syrian President Bashar al-Assad’s regime. Many young people, among them some who were not following radical Islam or were not even close to jihadi groups, answered the call of renowned religious scholars. In February 2012, clerics such as Yusuf al-Qaradawi declared it was a duty to help those fighting against Assad. In December 2012, Morocco hosted the Friends of Syria conference in Marrakech, a go-ahead for volunteers to jihad, who interpreted this event as an encouragement to support the Syrian opposition and by extension, jihad.

In 2013, a new organization, which provided a network for Moroccans eager to go fight Assad’s regime, was created in Latakia, Syria. The group, Harakat Sham al-Islam, was almost exclusively composed of Moroccan combatants, among whom were Mohamed Mahzouz, Mohamed Alami and Brahim Benchekroun, three former Guantanamo detainees. The group was active between 2013 and 2016, and Moroccan fighters have split between Jabhat al-Nusra and IS for the most part, according to experts.

The personal links between the former detainees was essential in organizing the group and convincing other Moroccans to join. Benchekroun had been jailed in 2005 for having recruited fighters for Iraq in the same period and location as other high-profile detainees, including some sentenced in the wake of the 2003 Casablanca attacks.

Benchekroun and Anas el-Haloui, also a member of Harakat Sham al-Islam, both former convicts killed in Syria in 2014, were also prominent members of the Joint Committee for the Defense of Islamist Detainees (CCDDI), a group created in 2011 to defend Salafi detainees.

Umm Adam, the most renowned woman in the Moroccan Salafi sphere, took part in several protests alongside members of the CCDDI. Educated at the Sorbonne in Paris and the wife of Karim el-Mejatti, an al-Qaeda member killed with their son in Saudi Arabia in 2005, she had pledged allegiance to Osama bin Laden. After being extradited from Saudi Arabia in 2003, she was detained for several months in Morocco. In July 2014, she decided to settle with IS in Syria and followed her other son there.

Umm Adam is one of many former al-Qaeda supporters who shifted to IS. But IS has also attracted random Moroccans mainly eager to live under the caliphate. Its creation is the achievement of a dream for many, said Abu Hafs, sentenced to 30 years in jail for having inspired the 2003 Casablanca bombings. As a cleric, he would make speeches defending jihad, and authorities arrested him for the content of his speeches several weeks before the attacks.

After he was released by royal pardon in 2012, Abu Hafs’ discourse dramatically changed and he reviewed his positions, clearly voicing his opposition to jihad in Syria. In March, he launched Al-Mizan, a research center financed by the traditionalist Istiqlal party, to gather information as well as analysis on terrorism-related issues in order to use his own experience to fight extremism, Abu Hafs told Al-Monitor.

Abu Hafs recalls dreaming of an Islamic state in his youth. “It was not the jihadis but those we call moderates who gave me that dream,” he said.

The Syrian conflict has attracted people from diverse social backgrounds throughout the country. In a country where opportunities to climb the social ladder are scarce and youth unemployment is high, reaching IS and playing a role there can be in many cases a source of enrichment. But for many, it can also be a sign of personal achievement.

Abdelaziz el-Mehdali’s story illustrates this sense of realization and fulfillment many jihadis believed they couldn’t find at home. Known as Abu Oussama el-Maghribi, the former street vendor was one of the most well-known Moroccan jihadi fighters. In 2011, he had taken part in the February 20 Movement’s pro-democracy protests, although like most Salafists he was mainly calling for the release of Salafi prisoners, considered to be political detainees.

Faced with a lack of opportunities in his hometown, Fnideq, where many jihadis come from in the north of Morocco, he joined Jabhat al-Nusra, a group he later left to join IS. In 2014, he was killed in clashes with Jabhat al-Nusra fighters.

Ahmed (not his real name), a 21-year-old student nurse, dreamed of a new life under the caliphate. But on his way to Syria, he was stopped with his mother at the Turkish border. And as soon as he stepped foot on Moroccan soil, he was arrested. He was later tried — his mother was not — and sentenced to a two-year term for trying to join a terrorist organization as per the anti-terrorism law, his lawyer, Idrissi, said.

Ahmed had decided to follow his mother, a housemaid who wanted to leave for Syria because of a family conflict and resulting financial problems that she believed didn’t leave her any other choice. Stuck with her son in a small apartment in Morocco that she was forced to share with her brother, who allegedly led a debaucherous life and heavily drank alcohol, she decided to join IS and convinced her son to go with her.

He didn’t want to let her go to Syria by herself. He had always dreamed of going to medical school, which he was brought to believe he could do in Syria under IS. To both of them, settling in IS territory was a way out that matched their religious beliefs.

“They [IS] were giving them [mother and son] some hope,” Idrissi told Al-Monitor.

“They were looking for an easy solution,” he said. “Paradise if they die, or IS if they remain alive.”