NEW YORK (Reuters) - A self-proclaimed white supremacist convicted on charges he planned to use a “death ray” to kill Muslims and President Barack Obama was sentenced on Monday to 30 years in prison, federal prosecutors in New York said.

Glendon Scott Crawford, 52, a Navy veteran and a member of the Ku Klux Klan, was found guilty in August 2015 of conspiring with another man to build a radiation dispersal device, dubbed a “death ray” by tabloids.

Crawford is the first person to be convicted under a law barring attempts to acquire or use a radiological dispersal device, which combines conventional explosives, such as dynamite, with radioactive material. Congress passed the statute in 2004 to punish individuals who try to set off a so-called “dirty bomb.”

U.S. District Judge Gary Sharpe imposed the sentence at a hearing in Albany, prosecutors said in a statement. He was convicted on three counts, including conspiring to use a weapon of mass destruction.

Crawford from upstate New York plans to appeal the conviction as well as his sentence, his attorney Danielle Neroni said in a statement. His lawyers argued unsuccessfully at trial that he was entrapped by the government.

Crawford’s co-conspirator, Eric Feight, pleaded guilty in connection with the case and was sentenced to eight years and one month in prison.

U.S. prosecutors had sought life in prison for Crawford. He faced a mandatory minimum of 25 years. After his release, he will be supervised for life.

“His plot to murder people he did not know was designed to, in his oft-repeated words, ‘take his country back’ from government leaders by forcing them to change government conduct he perceived as favoring Muslims,” prosecutors wrote in a pre-sentencing court filing.

Authorities said Crawford, who worked at General Electric Co, carried out extensive research on radiation dispersal devices, learning what level of emission was required to kill humans and conducting reconnaissance on potential targets, including a local mosque.

In conversations recorded without his knowledge by a confidential law enforcement source, Crawford spoke often of his hatred of Muslims and said he would go after Obama in the White House with the device.

Defense lawyers wrote in court papers that the device in question was constructed by federal agents and that Crawford never actually intended to use it.

“Mr. Crawford maintains that he never intended to endanger human life through the release of radiation or of radioactive nuclides,” Neroni wrote.