A federal judge pointed to an alleged suicide attempt by a supervisor with the U.S. Homeland Security Department in ordering him detained Thursday on a child pornography charge.

“It sure seems like he tried to commit suicide," said U.S. Magistrate Judge Jeremiah J. McCarthy. “I remain very concerned he may try this again,”

McCarthy did not rule out releasing Steven Metz, 40, down the road and asked his defense lawyers to produce documents showing he was discharged by the Erie County Medical Center.

Federal prosecutors claim Metz underwent psychiatric treatment at ECMC and remains a risk to both himself and others. They claim Metz drove his car past a closed railroad safety barrier in Blasdell and onto railroad tracks, where it was struck by an oncoming freight train, just a day after his home was raided by federal agents.

Metz’ lawyers said their client is suffering from two fractures in his back and requires treatment that he is not currently getting in federal custody.

Metz, a nationally recognized expert in terrorism smuggling, is charged with receiving and distributing child porn.