An upstate New York man accused of helping build an X-ray device he thought would be used to kill people at a mosque and an Islamic center has asked the judge to dismiss charges, saying the entire scheme was concocted by undercover investigators.

Glendon Scott Crawford says in court papers that evidence turned over by federal prosecutors shows that from 2012 until his 2013 arrest, 59 federal and state agents worked on the case and that "no criminal enterprise existed," except as they fabricated it.

Crawford, a General Electric mechanic, acknowledges reading about gamma rays, contacting his congressman and the Israeli embassy about the idea of using them on Islamic terrorists, and then being approached by "undercovers."

Co-defendant Eric Feight pleaded guilty last year to providing material support to terrorists.