BRUSSELS — The 9-year-old boy didn’t like school. He didn’t like the other children, because he knew what they really were: evil unbelievers who deserved to die. So he did what he was trained to do — he attacked them. He was removed from the building on his first day back.

The boy had spent two years away from his European homeland in a place where counting was taught by the strokes of a whip across a torture victim’s back; where watching public beheadings was part of the school curriculum; where his only role was to be molded into a future jihadi, or a “cub of the Caliphate.” His years in the Islamic State’s stronghold in Raqqa, Syria, had turned him into brutalized, radicalized and deeply confused young boy.

He is one of around 5,000 European men, women and children believed to have traveled to Islamic State territory since 2012 to fight with the Islamists or to live under their self-styled caliphate. Now, as they return, most governments are focused on short-term security, ignoring the immense needs of the damaged children.

The boy came home in early 2016 with his mother — a convert to Islam who is now on trial — and found himself in a world he had been trained to hate, where he trusted nothing and no one.