GELSENKIRCHEN, Germany—Werner Gallmeister, a high-school headmaster here, called the police in January with a worrying message. A 16-year-old student known for his Islamist sympathies had been showing off a smartphone video of an explosive device.  Police already knew the teen. He had been interrogated and suspended from one school after threatening to “break the neck” of a Jewish student. Police in 2015 searched his home. And he was enrolled in a government-sponsored program designed to prevent radical youngsters turning to violence.  Soon after the smartphone stunt, Mr. Gallmeister reported to police that his pupil’s behavior seemed to calm. He was wrong.  Three months later, the teenager, whom German officials and police identify as Yusuf T., allegedly threw a bomb at a Sikh temple in the nearby city of Essen as a wedding was drawing to a close. The Wall Street Journal isn’t using his full name in accordance with German custom. In the attack, three people were injured, one seriously.  Despite the warning signs, “we didn’t think he was capable” of such an act, said Mr. Gallmeister. The headmaster had attended a session with Yusuf, his mother and counselors just days before the bombing.  Promoters say counter-radicalization programs, which Germany uses more than most other nations, are an important way to deter people who might commit violence. They’re also a potential fix to the problem seen in recent attacks, including in Orlando, Fla., and France, where the perpetrators were known to law-enforcement but still not stopped.  Yusuf’s case has put that idea to the test and forced into the open a debate between those who still believe in the concept and others who argue it is ineffective and distracts from the primary goal of securing public safety.  The teen turned himself in after video surveillance photos of the scene were released, said his lawyer, Burkhard Benecken. Yusuf and another teenager suspected of attempted murder and causing an explosion are being detained pending charges, said Birgit Jürgens, a senior prosecutor in Essen in charge of the investigation. Mr. Benecken said he would challenge a charge of attempted murder, arguing that although Yusuf confessed to setting off the bomb, he didn’t intend to hurt anyone with it.  Three others suspected of involvement are also being detained until an investigation is completed, the interior ministry said. Yusuf hasn’t entered a plea because he hasn’t yet been charged.  Germany, unlike France, Belgium, Spain or the U.K., has been spared a major terrorist attack in recent years. It has a lower proportion of nationals and residents in the ranks of Islamic State than France or Belgium. Yet it has seen a sharp rise in followers of the fundamentalist Salafi strain of Islam, which security officials see as a recruiting ground for jihadists.  This year, the country is spending at least €10 million on initiatives to prevent the spread of Islamist extremism and another €1.6 million on a hotline for concerned families. Many of its 16 states have also bulked up spending. The state of Hesse this year nearly tripled its budget for a deradicalization effort, to €1.2 million.  The programs appear similar to psychotherapy—complete with warring schools of thought.  Thomas Mücke, a social worker, engages directly with young radicals through the Violence Prevention Network he co-founded after having spent years approaching neo-Nazis on the streets of Berlin. More than 50 counselors work with some 150 radicalized teenagers. They also take phone calls from worried relatives, teachers or police. Counselors try to establish a relationship with the subjects or their families to listen and provide emotional support.  Other outfits, such as the one run by Bernd Wagner, a former East German policeman, mostly eschew direct contact with subjects. His program, called Hayat—or Arabic for “life”—aims to help stabilize youngsters by tightening the family bond and advising relatives.  The programs have their roots in the 1980s, when Germany faced a sharp surge in far-right crime. After reunification in 1990, a small group of pioneers decided to seek out neo-Nazis and attempt to change their minds by engaging them in conversation. By the mid-2000s, Germany had some two dozen deradicalization programs and a thicket of prevention initiatives.  Proponents credit these efforts with the gradual disappearance of violent neo-Nazis. That left authorities with a new belief in deradicalization and an army of counselors eager for another challenge. German experts consult with the U.S., Canada, Denmark and Belgium on their experience with such programs.  Lorenzo Vidino, director of the Program on Extremism at George Washington University, contends the programs “are a must.”  “You are taking a chance, but what is the alternative?” said Mr. Vidino. “Police can’t monitor them all so even if a program is successful in only 30% of the cases, it’s still better.”  Dominic Musa Schmitz makes a counter case, citing himself as an example. He says he transformed himself from a bearded Salafist to a jeans-wearing young man with gelled hair without the help of a formal counseling. He wrote a book about his experiences, recalling how he pulled away from extremists with the support of a teacher and a girlfriend, and remains a skeptic.  “You can’t get anyone out unless he wants it,” he said.  In early June, for the second time, officials were called on the carpet by a state-parliament committee to explain what went wrong with Yusuf.  “The attack in itself was terrible enough, but then one of the attackers was in a prevention program. So we have to ask ourselves the question: Do the programs work or are they simply a placebo for the public?” said Gregor Golland, a conservative lawmaker and member of the committee.  Ralf Jäger, the interior minister, rejected the criticism. Despite warnings, police had no grounds to suspect Yusuf was about to commit an attack, he said.  Burkhard Freier, who runs the domestic intelligence agency in North Rhine-Westphalia, where Yusuf and his friends allegedly plotted their attack, said the program seemed to be “taking hold with Yusuf.”  In the first months of counseling, the teen had shown little interest in opening up to the counselors but that changed in the months preceding the attack, he said.  “Of course,” said Mr. Freier, “it is also possible he was doing this for tactical reasons,” faking an improvement to throw off authorities.  Investigators have since established that while Yusuf was attending counseling sessions, he was also running a WhatsApp chat group dubbed “supporters/followers of the Islamic caliphate,” in which some dozen teenagers conspired to perpetrate attacks, according to a report from the state interior ministry.  A German national born to a Turkish father, Yusuf lived in Ückendorf, a rundown neighborhood of Gelsenkirchen with above-average unemployment and a high migrant population. His involvement with radicalism began when he was 14, if not earlier, security officials said.  According to Mr. Freier, the boy had fundamentalist friends. He soaked up teachings on the internet and was influenced by a known Salafist preacher in the area.  And yet outwardly, Yusuf remained much the same—a boy in jeans and T-shirt, said Mr. Gallmeister, the headmaster who also taught him in class. His hostility toward women and endorsement of Islamic State were troubling, but he didn’t appear to be dangerous, the headmaster thought.  “He told me he wanted to study medicine and I kept reminding him of this goal,” he said.  According to the interior ministry report, Yusuf and his alleged accomplice ordered the ingredients for the bomb online two days before the attack. Yusuf’s lawyer said he mixed them together a few hours before placing and lighting the explosive outside the temple.  In a handwritten letter sent to the Sikh temple, Yusuf apologized for the “wrongdoing” he committed but said he didn’t intend to hurt anyone.  Mohinder Singh Nagpal, who co-runs the temple in Essen, declined to comment on the letter. Walking past buckets of debris outside the temple, Mr. Nagpal said he can still hear the children screaming on the day of the attack. “That this was kids is just crazy,” he said, referring to the perpetrators.  Under German law, counselors must alert authorities about people they believe might be planning to launch an attack or join Islamic State. But privacy rules mean they aren’t allowed to share the names of people unless they suspect they pose an imminent threat. Electronic record keeping is also limited for teens under 16—a rule the government is now changing following the Sikh temple bombing.  A strict separation between police and intelligence services further limits the flow of information. Mr. Freier, for example, said police didn’t inform the interior ministry about the headmaster’s January phone call.  While various people knew about Yusuf’s radical leanings, they were unable to compare notes until it was too late.  Measuring the impact of deradicalization programs is difficult. There are few tools available to show how something didn’t happen because of an intervention; various organizations also are loath to share information about their methods and outcomes, arguing that they need to work in secret to gain their subjects’ trust.  “We have an endless amount of practical experience from trying different things over the past 16 years, said Daniel Koehler, founder of the German Institute on Radicalization and Deradicalization Studies. “What is missing is a transparent debate.”  Florian Endres, who coordinates the German immigration agency’s nationwide radicalization hotline, said the ministry was trying to find ways to evaluate the programs.  The state of North Rhine-Westphalia, meanwhile, wants to learn from Yusuf’s case. Mr. Freier said the ministry will brainstorm ideas with Wegweiser counselors to improve the program and expand it. In Yusuf’s district, there are only two counselors to handle dozens of cases.  “Every day I ask myself: What else could we have done?” said Mr. Gallmeister, the headmaster. “I haven’t yet found the answer.”  Write to Ruth Bender at Ruth.Bender@wsj.com
German teen blows up a Sikh temple despite warning signs and deradicalization counseling, dealing blow to programs aimed at steering people from Islamic radicalism