The Yezidi boy known as S. was abducted by ISIS at the age of 9 and returned to his family at 12, a different person.

This story was produced in partnership with the Pulitzer Center.

Raised in northern Iraq’s small Yezidi religious minority, S. was 9 years old when the so-called Islamic State killed his father and brother, kidnapped him and turned him into a child soldier. He witnessed unspeakable violence, saw friends tortured and was beaten by the “teachers” who indoctrinated him into the group’s severe version of Islam.

Three years later, when his mother ransomed him back from ISIS for $10,000, he was returned against his will to a family he barely remembered. He tried repeatedly to run back to his former captors. He threatened his sisters with a knife, calling them infidels; hit his mother, saying he wasn’t really hers; and more than once tried to set fire to his uncle’s house. Brainwashed by ISIS with a combination of savage cruelty and lionizing praise, S. was wracked by interior conflict, a lonely pariah in a family alien to him, lashing out violently at the slightest provocation.

What to call the war on ISIS now that the group has lost the last of its territory in Iraq and Syria? President Donald Trump’s declaration of “victory” appears premature, given how much of the conflict exists not on battlefields but in the minds and souls of individuals.

Thikran Kamiran, now 19, was deemed too young to be executed with the men of his village. Newsha Tavakolian—Magnum Photos for TIME

In wars between countries, the losing side retreats to its borders. But since the late 1990s, the U.S. has been locked in wars against terrorist groups with no fixed address. The territory ISIS briefly did claim as a state served to enhance its attraction as something more difficult to confront: a global movement. Thus the question that now preoccupies counter-terrorism officials: What devotion does the group retain among the 8 million Iraqis and -Syrians it ruled at the height of its power, the estimated 40,000 people who traveled from elsewhere to join its caliphate and the millions around the globe who may be entertaining its extreme vision of Islam?

And what will become of the thousands of youngsters press-ganged into ISIS’s forces in northern Iraq? The terrorists separated Yezidi children from their families, sometimes killing their parents in front of them. In the soil of that trauma, they planted the idea that the boys were the future army of ISIS, indoctrinating them with the arrogance of conquerors. They laced the boys’ food with Captagon, an amphetamine, to dull their fear and trained some as suicide attackers. Many more were sent to the front lines where fighting was bloodiest, forced to wear suicide belts at all times, with instructions to blow themselves up if the enemy got too close.

A photograph of Kamiran, as an ISIS fighter, among family pictures at his home. Newsha Tavakolian—Magnum Photos for TIME

Each of these boys could grow up to become a threat to thousands, and each must be healed. In Iraq, some 1,500 Sunni Muslim children ages 13 to 17 are being held, charged with being members of ISIS, according to Human Rights Watch. Hundreds of others have returned to live with relatives, bearing the scars of battle, inside and out.

The Yezidi boys like S. now occupy the gray zone between guilty and forgotten. No one experienced the violence of ISIS as they did. It came from every side.

Kamiran in Duhok in February. Newsha Tavakolian—Magnum Photos for TIME

The Nineveh Plain, which extends north and east of the city of Mosul, has for centuries been a kind of showcase for ancient faiths: Assyrian, Chaldean, Syriac. Yet there the perhaps half-million Yezidi believers were such frequent targets of persecution that the group’s elders speak of 72 “genocides” even before ISIS swept over the entire region in 2014. The extremists displaced around half the Yezidis, killing, capturing and enslaving more than 6,000, according to Hussein al-Qaidi, director of the Kurdish government’s kidnapped affairs department. As ISIS retreated from its last redoubt, around 3,000 were still missing.

Some survivors tell how their Arab neighbors joined ISIS to seize their lands, kill their loved ones and drive them out. Hundreds of thousands now live in refugee camps, in the homes of relatives or in drafty, half-constructed buildings at the edges of Kurdish towns and villages. They say they don’t trust the Iraqi government to protect them from the next attempt at genocide, and many are seeking sanctuary in Canada, Germany, Australia or anywhere else that will have them.

The scattering will make it harder for their tribe to survive. The ancient Yezidi religion is inherited through birth, based on bloodlines via the father, and the tribe is divided into three castes that cannot intermarry. Shrinking the available pool makes the survival of the faith even harder — one more reason the boys who were taken, then brought back, need to be healed and woven back into the fabric of their community.

Boys and young men have little to do and lots of time to think at the camps around Duhok, where some of the roughly 250,000 Yezidis have been displaced from their homes, afraid to go back. Newsha Tavakolian—Magnum Photos for TIME

TIME met a number of survivors, interviewing several older boys extensively about their time with ISIS. Those under 18 were asked limited questions, with guardians or caregivers present.

Every boy’s story starts the same way. They tell you the moment ISIS attacked and their fathers, brothers or uncles were taken away. Sometimes they were permitted to stay with their mother and sisters for a while, but somewhere along their journey, moved like cattle from schoolrooms or wedding halls, they were singled out and taken away with other boys for religious indoctrination and military training. Around the age of 13, the unlucky ones were sent to fight.

Thikran Kamiran, 19, described the moment ISIS arrived in his large northern village and tricked his grandfather, the village leader, into gathering everyone together in the school courtyard, allegedly for safe passage out if they chose not to convert to Islam.

ISIS fighters led the Yezidi men and older boys away in three truckloads, supposedly carrying them to safety at nearby Sinjar mountain. Thikran, then 15, was with his mother and sister, cowering in the school courtyard, when they heard thundering volleys of gunfire in the distance. The ISIS fighters told the panicked women and children that it was just animals, but everyone knew their husbands, brothers and sons had just been killed.

The ISIS fighters saved Thikran’s grandfather for last, letting him listen in horror to that gunfire and realize he’d led his people into a trap, before taking him outside and shooting him too.

Khayri Abdullah Massi ransomed family members, but his wife went back to raise the child she had by her "ISIS husband." Newsha Tavakolian—Magnum Photos for TIME

That’s the day Thikran learned to hide his anger and fear. He was taken with his mother and sister to the ISIS stronghold of Tal Afar, and sent to an Islamist school to study the Quran from sunrise to sometimes well after sunset. He said he learned to recite the Quran and ISIS ideology better than his peers — so well that his ISIS overseer offered to make him an instructor, though he turned that “promotion” down. He said his scholarship is why he never had to fight.

“We converted to Islam and told them ‘We will obey you,’” he said. “I made that sacrifice to protect myself and my family.” He doesn’t feel guilty for playing along, he says; he “feels nothing,” a frequent answer from many of the boys. Burying anger, pain and fear was a survival skill. Reactivating emotion means facing grief over loved ones killed, guilt over anyone they may have killed or whatever else they did to remain alive. So they stay numb.

The Yezidi child soldiers were often grouped together with others of their tribe, yet ISIS trainers also worked to break down any connection among them, by putting one of them in charge of their unit and making him responsible for meting out vicious beatings for infractions like failing to reassemble a weapon fast enough.

Shalal, 15, and his sister Rawa, 12. "ISIS told us about heaven, told us we were on a good path," he said. Shalal was 11 when he was taken and indoctrinated in a military training camp. He added, "it affected our minds." Newsha Tavakolian—Magnum Photos for TIME

Two cousins, both 16, explained how they were trained in an all-Yezidi unit, then deployed to the “Line of Paradise” — ISIS’s name for the Syrian front lines where many Yezidi boys were sent as cannon fodder, surrounded by enemy troops and hammered from above by airstrikes. The cousins say they had to wear suicide belts much of the time, packed with metal intended to kill attacking troops if they overwhelmed the Yezidi front line.

Many Yezidi boys got detailed lessons on how to kill. In some camps, the student soldiers were forced to watch instruction videos on beheading, from how to lift the prisoner’s head by his scalp to where to cut the throat. Yezidi boy returnees described learning how to remove hands, arms or legs as punishment for crimes like theft. One described an operating-theater-like room where they watched a limb removed from an anesthetized patient.

Some boys were also taught how to crucify those found guilty of disobeying ISIS’s dictates, a punishment several boys say happened almost weekly. The dead were left rotting for days in public squares or busy intersections, wearing a sign describing their crime — usually refusal to convert.

Subha, 35, and the hands of her children: Fahad, 15; Fahdi, 13; Linda, 10; Liza, 7; and Salam, 5. Photographed in February, they were captured by ISIS in 2014 and held as slaves until recently escaping the battle in Baghouz. Fahad, who had been trained as a fighter, led the way to safety. Newsha Tavakolian—Magnum Photos for TIME

Amid these horrors, the boys were offered grandiose metaphysical escape. Their captors told them that their Yezidi families were destined for hell, but that they were the righteous ones who would inherit the caliphate. “ISIS told us about heaven, told us we were on a good path,” said ISIS escapee Shalal, now 15, his voice still high and childlike. He was 11 when he was taken, along with his mother, younger sister and brother, and indoctrinated in a military training camp. “It affected our minds,” he recalls. “Whenever we talked to our families, we would tell them what ISIS told us, that they needed to become Muslims too.”

As coalition bombing intensified against ISIS, Shalal decided it was time for his mother, sister and brother to escape the group’s self-declared capital, Raqqa. He reached his father by telephone back in Iraq, who arranged for a smuggler to meet the boy and his brother Hachim, now 7, at the front lines. “It was very scary,” Shalal recalls, describing how he guided his brother through bushes in the dark. Shalal’s mother and sister were smuggled out later for roughly $10,000 each.

The family’s escape was in part the result of the bizarre economy of ISIS’s wartime loss of territory. In its waning days as leaders of a would-be state, ISIS had a sort of Craigslist of captives it was offering for sale — cashing in on the victims it had seized during its march across Syria and Iraq. The government of Kurdistan, in northern Iraq, set up a $10 million fund to help pay for the return of kidnapped children. Many, including Shalal’s father who ransomed them and now cares for them all, are still waiting to be reimbursed.

Clothes dry on a fence at a camp for displaced Yezidis near Duhok. Newsha Tavakolian—Magnum Photos for TIME

Physical deliverance for the Yezidi boys was just the beginning of the journey back. Shalal was aggressive and angry when he first returned, said his father, who had narrowly escaped capture himself while traveling for business. Now he seems quiet and subdued, sitting next to his father as he describes his time with ISIS, looking down at the floor of their unfinished house and playing with his smartphone. He won’t give many details about what else he saw or did as a fighter for the group. His father, a teacher who studied psychology, insists his son is fine and doesn’t need counseling. But as the boy listens to his older cousin Ashrawe describe fighting for ISIS, his far-off gaze suggests otherwise.

Ashrawe manned checkpoints in the middle of some of the fiercest fighting in Syria, and he was badly wounded in a mortar strike that killed two other boys in his unit. His leg still hurts from embedded shrapnel. He also came back with a young Yezidi wife given to him by ISIS. But at 18, with no job, he struggles to take care of her, so he too relies on his uncle the psychologist, for food and the shelter of the incomplete concrete apartment block they live in, its windows just blank holes open to the chilling February wind.

The family is also dealing with another tragedy of the war. Shalal’s mother had a child by an ISIS fighter while in captivity. Shalal’s father had refused to take the child in, so she left the infant at an orphanage in Mosul where other former ISIS children were being sent, when she was rescued from ISIS along with her daughter and sons. Torn by the memory of the abandoned child, her husband said, she chose late last year to leave her family and go back to find her baby.

Father Patrick Desbois is on a mission to heal the boys, and to keep them from hurting anyone else. The ­Catholic priest has recorded interviews with more than 100 Yezidi survivors, focusing primarily on the children. Newsha Tavakolian—Magnum Photos for TIME

The familial trauma has been made worse by a quirk of the Iraqi constitution. Under that document, children born of ISIS fathers, or an unknown father, are automatically registered as Muslim. That registration in turn automatically switches the mother’s religion to Islam as well. Yezidi elders call this genocide by constitution and have appealed to Iraqi officials in Baghdad to change it.

Yezidi elder Hadi Babashekhi, son of the Yezidi religious leader Baba Shekh, claims that his community is finding a place for children like Shalal’s half–sibling. But other Yezidi community leaders, and former Yezidi slaves, say the community rejects such children, so an unknown number of former ISIS slaves like Shalal’s mother are forced to choose between their faith and family, or exile with their child born in captivity.

Shalal’s father is angry and resentful, frequently bringing up what he says is his wife’s betrayal, when asked about his son, one more emotional weight for Shalal to bear.

Handprints of worshippers who came to pray at the Yezidi holy site of Lalish, tucked within a valley north of Duhok, in February. Newsha Tavakolian—Magnum Photos for TIME

When the fight against ISIS was on the battlefield, there was no shortage of resources: through fiscal year 2019, the U.S. military has committed $54 billion to the war effort, according to a Brown University estimate. But it’s a different story now that the contest has moved into the personal space, where funding for social –services and counseling is hard to come by.

The Yezidi boys have a certain amount of help from their faith. The religion’s leadership passed a decree in 2014 that forgave their people for the sin of being forced to convert, or for being raped, or for being forced to kill and maim for ISIS. With that came the offer of a ritual of return that includes a rebaptism ceremony for men, women and children to cleanse them of the sin of whatever they were forced to do.

“We will slowly, step by step, convince those children … to put the Yezidi community’s humanity back into their heart, because there is no more peaceful religion than Yezidi,” says Babashekhi. The “rebaptism” takes place at the Yezidi holy site of Lalish, tucked within a valley north of Duhok, a scenic city encircled by mountains in Iraqi Kurdistan. All members must visit at least once in their lifetime to submerge themselves in the 4-to-5-ft. deep well inside a small, worn stone shrine, sacred to Yezidis.

Judge Ayman Mostafa is trying to build a case against ISIS for war crimes to the Kurdish High Commission on Recognition of Genocide. He has no power to indict or prosecute its fighters. A genocide charge can be brought only by a U.N. body. Newsha Tavakolian—Magnum Photos for TIME

Adult survivors say the ceremony helps, but others say it is not enough to stop the nightmares or flashbacks or to purge the guilt a child feels, which can be channeled inward into depression and outward to rage. Duhok also happens to be the home of one of Iraq’s only child and adolescent mental-health centers. But counselors there explained they don’t have the funding or the staff to seek out the children and treat them on a regular basis — the kind of treatment that’s needed to undo how these children were conditioned to kill.

“Calling it brainwashing is to underestimate what has happened to the kids,” said one of the only other child psychologists there, Galavej Jafaar. Another psychologist, Araz Adil with the Kurdish nonprofit SEED, said, “When they arrive, everyone gives them so much attention. After a while when they stop getting that attention, their symptoms start to appear, and you see PTSD, depression and anxiety, and that’s when they have a longing to go back.”

The boys’ recovery from trauma has immense implications not only for the individuals but also for international security. Yet the matter is muddled by conflicting agendas. Yezidi elders downplay the risk, while Baghdad, though obligated by international convention to rehabilitate child soldiers, ignores Yezidi boys and jails Sunnis as young as 13. There’s also uncertainty about the numbers involved. Out of the roughly 6,400 Yezidis taken by ISIS, 1,855 children had returned as of mid-February. Of the boys, around 300 ticked the box on the form admitting that they had fought for ISIS. But al-Qaidi of the Kurdish government’s kidnapped affairs department thinks the number is much higher.

“Some 1,200 kids between the ages of 13 and 17 were taken to the military bases to be trained to be fighters,” he said, citing interviews with hundreds of returnees. “Those kids who are still in captivity and being trained are a threat to the whole world… These kids, ideologically and practically, have been prepared to attack,” al-Qaidi said. “They are made into a bomb, ready to be triggered by ISIS.”

A man mourns at a Yezidi cemetery in Duhok, where many Yezidis killed by ISIS are buried, in February. Newsha Tavakolian—Magnum Photos for TIME

Father Patrick Desbois, a Catholic priest who runs a nonprofit called Yahad-in Unum, has recorded interviews with more than 100 Yezidi survivors, focusing primarily on the children and how they were trained to believe they would carry on after the ISIS territorial “caliphate” is gone. The French cleric’s Yezidi team keeps track of new arrivals. For interviews, a cameraman, photographer, translator, Desbois and a former Belgian police investigator all pack into a tent or drafty sitting room and start the questions. “Was the suicide belt you had to wear heavy?” Desbois will ask.

Desbois says he uses some of the accounts to explain to officials from other Western countries that the children they are welcoming could be dangerous if not carefully “deprogrammed” and healed. He tells the story of one boy now resettled in the West whose social–media posts swing from anger that ISIS killed his mom to slogans that ISIS will rise again.

As evidence that his program can rehabilitate the lost boys of ISIS, the priest offers the story of another returnee. At a camp near Duhok, the boy rounded up former child soldiers and started a gang that built several improvised explosive devices. The bombs were spotted and the plot foiled, and the Yezidi community and Desbois’ nonprofit intervened to keep the child from going to jail. After counseling and sport and art therapy, Desbois says, the child has returned to his community.

“The best deradicalization program is a successful integration program,” says David Manicom, Assistant Deputy Minister at Immigration, Refugees and Citizenship in Canada. He declined to say whether the 1,400 mostly Yezidi survivors of ISIS the country has taken in included child soldiers, but noted that trauma is so common that therapists have learned not to leave a child alone with an adult for any length of time, because of how violently it upsets the child living with memories of abuse.

Questions of justice, meanwhile, remain unresolved. In northern Iraq, Judge Ayman Mostafa is trying to build a case against ISIS for war crimes to the Kurdish High Commission on Recognition of Genocide. But he has no power to indict or prosecute its fighters, and a genocide charge can be brought only by a U.N. body, which Iraq regards coolly because it will not consider capital punishment. All the while, thousands of ISIS fighters have simply returned to the fabric of their old lives, living openly in Mosul and Tel Afar. That’s one of the main reasons that hundreds of thousands of Yezidis won’t go home — they know who awaits them there.

The Yezidi boys know it too.

Sairan Khalaf speaks Kurdish; her daughter, 11, knows only Arabic after three years of captivity. Newsha Tavakolian—Magnum Photos for TIME

For his part, S. no longer tries to run away from home. Months of slow, careful attention from a team of therapists working with him and his mom have brought him a long way. “The first time I met him, he ran away,” said Adil, the psychologist from the Kurdish nonprofit SEED. “The second time, he was beating up his mother violently.”

Adil worked to teach S. about where his own emotions were coming from — how a surge of adrenaline fuels a faster-beating heart, stoking emotion and driving his anger higher. The idea was to return to S. the control of his body and mind that ISIS had taken from him. At the same time, his mother was taught not to respond to her son’s violence with more of the same. Most tribal families in Iraq hit their children to discipline them, Adil explained. Both the mother and the child learned how to express their emotions without physically hurting each other.

Now her almost teenage son still gets angry but doesn’t hit her, the mother said. She compliments him on keeping his control. He in turn compliments her for the verbal praise.

The work is not done. S. still holds some of the values ISIS taught him, telling his therapist, “Men and boys we are one lot. Women and girls are worthless.” But a year after his return from ISIS, he helps around the house and tells his mother that he’s glad he came back, because he’s the only man the family has left.

Contact us at letters@time.com.