The man arrested Wednesday in connection with a mass shooting inside a Brooklyn subway station will be held without bail, a judge ordered at his arraignment Thursday.

Frank James, 62, appeared in Brooklyn federal court Thursday afternoon, a day after he was arrested in connection with Tuesday's attack inside a Sunset Park subway station.

Lawyers for James requested that he undergo a psychiatric evaluation. They also requested magnesium tablets for his leg cramps.

Police said James put on a gas mask, set off two smoke grenades and opened fire on an N train as it pulled into the 36th Street subway station during rush hour Tuesday morning.

The attack injured 29 people, including 10 people who were shot, the NYPD said.

James was arrested in the East Village Wednesday afternoon, more than 24 hours after the attack, police said. 

Law enforcement sources told NY1 someone claiming to be James called the NYPD's Crimestoppers tip line and said they were at a McDonald's in the East Village. A defense attorney for James on Thursday said he did call Crimestoppers on himself. 

He has been charged with terrorist attacks or other violence against a mass transportation system, the U.S. Attorney’s Office for the Eastern District of New York said Wednesday.