ALBANY, N.Y. — A 52-year-old industrial mechanic who was the first person in the U.S. convicted of trying to produce a weapon of mass destruction under a 2004 law intended to stop terrorists from using radiation-dispersing “dirty bombs” was sentenced Monday to 30 years in prison followed by a lifetime of supervised release.

Glendon Scott Crawford, of Galway in upstate New York, planned to kill Muslims because of their religion as well as other people whose political and social beliefs he disagreed with, U.S. Attorney Richard Hartunian said.

“This is a classic case of domestic terrorism,” Hartunian said after Crawford’s sentencing by U.S. District Judge Gary L. Sharpe.

Investigators began tracking Crawford in 2012 after he approached two local Jewish groups with his idea for how they could defeat their enemies using a mobile X-ray weapon. Prosecutors said Crawford also sought support for the device in 2013 from a Ku Klux Klan grand wizard in North Carolina who was an FBI informant.

Co-defendant Eric Feight, of Hudson, pleaded guilty in 2014 to providing material support to terrorists. He admitted building a remote control for the X-ray device. Feight, a control systems engineer, was sentenced to eight years in prison a year ago.

Crawford, who worked with Feight at General Electric in Schenectady, was convicted in August by a jury that rejected his lawyer’s argument that he was entrapped by the FBI.

Given an opportunity in court Monday to argue for a more lenient sentence, Crawford delivered a complicated statement about physics, his interpretation of legal statutes and criticism of his defense lawyer. He insisted he never intended personally to use the device he was making, but only to provide “technical assistance” for others to use it.

“I feared for my nation’s and my children’s nation’s future,” Crawford said, launching into a criticism of U.S. immigration policy regarding Muslims before the judge cut him off.

“This conduct is bizarre,” Sharpe said. “You are bizarre.”