SYRIA -- Thirteen-year-old Hassan may have committed atrocities for the "Islamic State of Iraq and Syria" (ISIS), but instead of jailing him immediately, the Kurdish authorities in northeastern Syria placed him in a rehabilitation centre.
Hassan is one of around 80 adolescents, ages 12 to 17, who are undergoing rehabilitation at the Hori Centre in Tal Maarouf in al-Hasakeh province. All of them were detained by Kurdish fighters or international coalition forces.
Some are children of ISIS families, whose parents may be in jail, while others were directly recruited -- forcibly or voluntarily -- by ISIS.
Local officials admit their prisons are full and say they are hoping a constructive approach can help mend ties with local tribes that once backed the extremists.
Hassan checked into the Hori Centre early this year, months after the opening of the complex of red-brick rooms and dorms framing a rectangular lawn.
As the son of a senior ISIS commander in the Syrian city of al-Raqa, once the de facto capital of the group's proto-state, he regularly witnessed beheadings.
The Kurdish forces who captured him found a picture that shows him holding a severed head, but whether the boy ever killed anyone himself is not clear.
"When he arrived, like many of them, he did not say hi, did not shake our hands and did not look us in the eye," said Roka Khalil, one of the centre's two directors.
Like other teenagers ISIS called the "cubs of the caliphate", Hassan had been subjected to the group's efforts to impose its brand of violence and extremist ideology on an entire generation.
Now, some of those youngsters are housed in dormitories where they have no access to phones or the internet but where staff are available day and night, said Abir Khaled, the centre's co-director.
"We consider them as humans, as victims of the war," she said.
While most of the children are Syrian, the centre also hosts former "cubs" from countries including Turkey and Indonesia.
Their days follow a strict routine that includes a lot of sport, various chores on the compound and workshops training them to become barbers and tailors.
Also central to the rehabilitation process is a curriculum that includes history, geography, Arabic and Kurdish classes, as well as a "morality" class.
Many have experienced poverty, received very little education and grew up in tough family environments. Four of them were dispatched by ISIS to carry out a suicide operation but surrendered instead, according to the centre's staff.
"It shows that their ideology is not that deep, and can be easily fixed," Khalil said.
A third of the Hori Centre's "guests" have been sentenced to prison terms ranging from six months to seven years, but Kurdish authorities believe they can be rehabilitated if they are given a supportive environment.
If their conduct is good at Hori, their sentences may be reduced and they could be released to their families within months.
Hassan is now awaiting trial and Khalil said he may be given a term of up to three years, although that could be reduced.
Khalil said it was too early to describe the centre's activities as a success, but stressed that results were already tangible.
"Today, lots of them come to talk to us by themselves," she said.
"Hassan does not insult his classmates any more when there is a dispute," she said, adding that "he even listens to music".