"I don't know how many Hashed I have killed," says Khayralah Mezadivan, 18, about the battles he fought for the militant "Islamic State" group against the Iraqi Shiite militias, the Hashed al-Shabi. He jokes: "Nobody kept score."

He sits at a table in the library of the juvenile prison in the Iraqi Kurdish capital, Irbil, where he is serving a nine-month sentence. Here, over a hundred Arab youngsters taken prisoner by Kurdish peshmerga troops are being held for their involvement with IS. Some deny having trained or been stationed on an IS base, others admit to it. But Mezadivan — who wears his long hair under a black cloth tied like a tight cap around his head and his trousers above the ankles, as IS ordered men to do — freely admits not only to manning checkpoints, but also to working with the IS police and even fighting on the front line.

Read more: Iraqi historian documents IS atrocities in Mosul

He was one of the lion cubs of the so-called Caliphate, the youths the Islamists looked upon as their future. Why did he answer the call as a 14-year-old in Mosul? "I liked the way they explained the Quran. And the situation was bad: There was no work, no water, no electricity. And they threatened punishments, too, if I didn't join." The prison staff consider him dangerous, as the paradise IS promised still entices him.

In Iraq's three-year war against IS, thousands of men and youngsters were arrested for ties to the terror group. They ended up in Kurdish and Iraqi prisons, and their total number is thought to be around 20,000. How many are under 18 is unclear; statistics are lacking. Prison visits by researchers or reporters are rare and short, and like here in Irbil, all cameras, phones and other recording devices are prohibited.

Hundreds of underage boys are imprisoned in Iraqi Kurdistan. In March 2017, the rights group Human Rights Watch (HRW) reported 150 minors in Kurdish prisons, but that number has probably increased as the war did not end until late July of that year. Statistics on the number of underage inmates in Iraqi prisons do not exist. HRW recently reported that Iraqi judges had tried 400-500 underage prisoners, some of them foreigners. According to reports, some have been given long sentences.

Taking photos of Irbil's juvenile prison is prohibited inside and not appreciated outside

Ensnared in Islamist ways

While the fast-track procedures the Iraqi courts have used to try foreign IS fighters — and the death sentences doled out to them — have attracted considerable media attention, the fates of local youths who ended up in IS's nets have hardly been noted. Those who survived and were caught can be divided into three categories, says social worker Jwanro Majid, who works from a portable building on the grounds of Irbil's juvenile prison (photo left). The prison's 101 terror-related inmates were either, one, involved with IS simply for the cars, weapons and money; two, they had basic training; or, three, they actually fought for the group.

Read more: IS members face controversial Iraqi court trials

Mezadivan clearly belongs to the final category, which appears to be the smallest. When asked what was good about IS, he says: "We were going to heaven, where we'd get women and even be friends with the Prophet Mohammed." And now? "I believed it then. Now I think they're just stories."

Now he is sorry about the many people he killed in battle, or so he says. But his clothes and his stance tell a different story. The way he still slips excerpts from the Quran into his speech. And how he suddenly defends IS, adamantly denying the group gave its fighters drugs to ward off fear. "That's not how they were. Those are stories. The Quran says you are stupid if you do not feel fear." Only to add, quite illogically: "It doesn't make any difference to me if I die or not."

Even the book he borrowed from the prison library this week makes it clear IS is still in his system. "I dream a lot. So I took a book that explains dreams." For radical Muslim groups like al-Qaida and IS, interpreting dreams is a serious matter because of their presumed predictive nature.

IS left behind this former checkpoint, near Rabia

He is also still extremely negative toward the Shiite militias he once fought. They are the reason he will not go back to Mosul after being released. "The city is in the hands of the Hashed, and they are all criminals." And how is his family there? "They are well." He does not mention that they will likely not want him back, for fear of the whole family being expelled from the community due to his ties to IS.

Nor does he mention a further powerful reason not to return: He would be rearrested immediately and could be sentenced to death. Baghdad does not recognize the sentences Kurdish prisons mete out to IS fighters; it invariably hands out death sentences to those who fought for the group.

And it's true that his nine-month prison sentence is very lenient in light of his crimes, especially when another youth was given six months just for attending IS training in a mosque. Mezadivan smiles and says he simply answered the judge's questions, implying that he did not volunteer any information and that the judge might not have asked the right ones.

Uphill battle to win over extremists

Social worker Majid says he feels powerless when it comes to boys like Mezadivan. They are difficult prisoners, partly because prison seems like a hotel to them after the hardships they underwent with IS, or "Daesh" as the locals call the group. "They are not normal prisoners, because Daesh used them to spy on each other, and because all they care about is paradise. Daesh messed with their minds."

They have no respect for the guards or for the social workers, whom they consider unbelievers. "They say: 'You are not Muslims, you have it all wrong. We must go back to the time of the Prophet. Things will only be okay, if the whole world turns Muslim.'"

Yet Majid and his colleagues do not falter in their efforts to disentangle the youngsters from radical Islam. "We keep them busy," he explains. And there are courses, computers, books, football. And discussions with specially selected young imams. They seem to reach the boys better, he says: "We do not want any old sheik with old-fashioned ideas."

Prisoners accused of crimes related to IS wait outside a court near Mosul

They also offer music, which was forbidden under IS. The musician who teaches piano and guitar is surprisingly popular with most of the boys, says Majid. "They say: 'We can't sleep after we've heard the music, for we are so very happy.'" With most, but not with those like Mezadivan, who do not want to mend their ways.

UNICEF and other international organizations provide training for Majid and his colleagues in deradicalization. But the prison is overpopulated, and there is no way to prevent the hard-liners from sitting together and continuing the radicalization process started by IS. A dangerous situation, given that IS was born in Iraqi prisons after the demise of al-Qaida in Iraq.

How many seeds of doubt the young imams can sow in these lion cubs' brains is unclear. When asked how "safe" youths like Mezadivan are after they have completed their sentences, Majid appears pessimistic. "We always recommend that the security police keep an eye on them, because we believe they will go back to Daesh. Even after 10 years in prison."