The commitment of Minnesota’s federal court system to root out the causes of homegrown terrorism and to deradicalize, or disengage, those who get caught up in it is both commendable and prudent. It’s a goal that should be considered by court officials in other parts of the U.S. as they deal with both domestic and foreign hate groups.

The early success of a deradicalization program in Minnesota is detailed in a recently released report by Kevin Lowry, the onetime chief probation officer for the state’s federal court district. Lowry managed a pilot project at the urging of senior U.S. District Judge Michael Davis after an influx of cases involving young Somalis who were enlisted to serve terrorist groups such as al-Shabab and ISIS.

The program is also applicable to cases of participants in domestic hate crimes, including those like the bombing two years ago of the Dar al-Farooq Islamic Center in Bloomington by a white supremacist cell from Illinois.

It’s a sobering report from the recently retired Lowry on efforts to confront terrorist and extremist groups, both international and domestic, and prevent the recruitment of those most vulnerable to their violent and hateful messages. The first sentence in the document is prescient: “There has never been a greater challenge for criminal justice professionals than the one faced today with global terrorism, as it reaches into communities worldwide.”

Minnesota’s deradicalization program — Davis prefers to call it disengagement — is a hybrid built from efforts in Germany and Great Britain. It involves identifying how extremists were radicalized in the first place and then providing them with mentors, counselors and treatment providers for rehabilitation, not unlike programs developed over the years to deal with criminals involved with gangs and drugs. Along with an ongoing risk assessment, the disengagement process starts at the time of arrest and continues through to supervised release at the end of a prison term. A defendant’s participation in the program also plays a role in bond considerations as well as sentence lengths.

Minnesota has been both an experimental and training lab in deradicalization efforts. Early results are promising. In 30 cases involving ISIS or al-Shabab-related activities, 12 of the defendants qualified for release from custody before their sentencing, and 10 successfully completed the disengagement program.

But the sample set is small, and the program admittedly is a work in progress. Indeed, no rehabilitation program is perfect, cautions Davis. “People with high security offenses will reoffend. We know that. But we are trying to keep the community safe and train [probation] officers to know what is happening in the community … and make sure they don’t reoffend,” he told an editorial writer.

The program recognizes that radicalization leads to criminal acts that are driven by ideology rather than greed or personal gain, and that sophisticated recruitment tools using social media make it easier for terrorist organizations to prey on those most vulnerable to their message of martyrdom.

The Minnesota report notes that the extremist groups posing a threat in the U.S. range from jihadists to white supremacists like the Aryan Nation and the Ku Klux Klan. “In these times, it is not a matter of if, it is a matter of when, where and how catastrophic the next terrorist attack will be,” the report states.

But prevention and intervention efforts will not come cheaply. “The point is that millions of dollars in resources will need to be allocated to better protect our communities and country from extremist attacks,” the report concludes.

Lowry’s report shows how far the U.S. is behind in dealing with this new breed of criminal. But the disengagement efforts highlighted in its pages are a credit to legal minds in Minnesota such as Davis and Chief Judge John Tunheim, who recognized that failure to confront geopolitical issues and adapt to an evolving world order could be catastrophic.