Ahmad hails from Raqa, the northern city that served as the de facto capital of a now-collapsed jihadist "caliphate" sprawling across Syria and Iraq.

"I used to dream of establishing an Islamic state... but now, we take courses that clear up what's wrong with what we once believed," 23-year-old Mohammad Haj Ahmad says.

Based in the rebel-held town of Marea, the Syrian Centre for Countering Extremist Ideology is home to around 100 one-time IS fighters from Syria, the Middle East and even Europe.

In a rehabilitation centre in northern Syria, young men huddle over an innocuous game of chess and some cigarettes -- activities they once brutally suppressed as Islamic State group jihadists.

Sign up for our Newsletter

He joined IS in 2014 and took part in one of its most gruesome battles at Tabqa airport near Raqa, where jihadists executed more than 200 army troops.

"I was completely convinced by their slogans about jihad, that they were the only ones implementing religion correctly, and that everyone else was an infidel and an

apostate," he tells AFP.

"My father was scared I'd be convinced to blow myself up."

Now, Ahmad and fellow ex-jihadists are undergoing intensive rehabilitation courses in Marea aiming to wash away extremist habits so they can ultimately reintegrate into society.

Ahmad doesn't know what he will do once he is cleared by rebel authorities to leave the centre.

"Maybe I'll start a business, continue my studies, or go to Europe," he shrugs.

Therapy, civil rights

Ex-jihadists attend a lecture at the Syrian Centre for Countering Extremist and Ideology in the rebel-held town of Marea in Aleppo province (photo by: Nazeer al-Khatib/AFP)

The two-storey centre in Marea opened on October 27.

"We founded the centre because of the many fighters coming to northern parts of Aleppo province after the collapse of IS, which created a security problem," says its head, Hussein Nasser.

Some lodgers checked in voluntarily, while others are undergoing therapy as part of the jail sentence dished out by rebel authorities for joining IS.

They are split into three categories: short-term IS fighters, those who fought heavily or for an extended period and foreigners from Tunisians to Uzbeks.

Treatment lasts up to six months, which can be renewed, Nasser says.

The administrators, doctors, and activists who run the centre coordinate closely with rebel authorities, particularly the court system.

"The centre's lecturers provide an assessment to relevant judicial authorities, who decide if the person can be integrated into society or not," Nasser adds.

He says the centre is financed locally but seeking additional funds to take in more foreigners and open a branch for female IS members.

Inside, patients shuffle into classrooms for group and individual therapy sessions as well as courses on Islamic law, civil rights, and psychology.

Some sport beards and others are clean-shaven. Most wear an unofficial uniform of bright sweatshirts under sleeveless back vests.

"The courses are similar to corrective treatment,

giving them positive outlooks on themselves and their abilities," says the centre's psychosocial therapist Abdulkarim Darwish.

Darwish listens to their life stories, then runs therapy sessions to identify what social factors led them to join IS.

Former IS jihadists share a meal during a break at a rehabilitation centre in a rebel-held town of northern Syria (photo by: Nazeer al-Khatib/AFP)

During breaks, the ex-jihadists pray, eat modest meals on mattresses lined around a windowless room, and play chess -- one of the many forms of entertainment IS considered un-Islamic -- or spend time with their wives and children, who also stay at the centre.

'I didn't come from Mars'

"I never thought I would turn into a jihadist," says Hawas al-Ali, 26, who qui his job as a cook in northern Iraq in 2016 and moved to east Syria.

He joined an IS police unit deployed to bolster flailing jihadist fighting battalions.

"My aim was the victory of Islam, but after a while I began thinking about returning to civilian life, society, my relatives and children," says Ali.

Former IS jihadists pray at a rehabilitation centre in northern where they are learning how to reintegrate into society (photo by: Nazeer al-Khatib/AFP)

He checked himself into the centre and now says he's excited to return "to my life before Daesh (IS)".

Ali fears being arrested if he returns to Iraq, so for now is stuck in northern Syria and may travel to Turkey.

Ashraf Nasir, 24, says he is ready to become again an active member of a society which IS once terrorised.

"I'm an essential part of society -- I didn't come from under a rock or from Mars, even though I joined Daesh," he says.

The problem, Nasir worries, lies in "how society will accept us".

Going home will be even harder for foreigners like Muslim Gadzhimetov.

The Ukrainian entered Syria in 2016 coming from Turkey to join IS and earlier this year he was detained by rebels.

Gadzhimetov says he decided to defect when he learned of the atrocities committed by IS against other Muslims.

"I consider m

yself guilty for this," he says.

"Of course I want to socialise and so on, I want to return to civilian life. I dream about this life."