NEW YORK — The man charged in the Brooklyn subway shooting is expected to make his first appearance in federal court Thursday after a more than 24-hour hunt led to his arrest the day before. 

Frank R. James, 62, was charged with a terrorist or other violent attack against a mass transportation system and will appear before U.S. Magistrate Judge Roanne L. Mann in Brooklyn, according to a statement from the U.S. Attorney’s Office for the Eastern District of New York.

James is accused of carrying out the attack that left at least 29 people injured, including 10 with gunshot wounds, after he donned a gas mask, threw smoke grenades and opened fire on a Manhattan-bound N train around 8:30 a.m. Tuesday, authorities say.

The shooting set off a search for James who fled via another train at the Sunset Park subway station, police said, and evaded capture for more than a day. 

NIGHTMARE ON THE N TRAIN:Inside the terrifying moments during the Brooklyn subway shooting

New York City Police Department patrol officers arrested him Wednesday afternoon in Manhattan’s East Village after a tip came into the department’s “crime stoppers” line. According to law enforcement officials who weren’t authorized to comment publicly, it was who James called the “crime stoppers” line to report he was at a McDonald’s in Manhattan.

“My fellow New Yorkers, we got him,” Mayor Eric Adams said at a Wednesday news conference.

James will be represented by federal defenders who were appointed to him Wednesday, according to records filed in federal court. At the hearing Thursday, a judge will inform James of the charges against him, but it’s unclear whether he will enter a plea. James faces life in prison if convicted.

WHAT WE KNOW ABOUT FRANK JAMES:Suspect arrested in the Brooklyn subway shooting

James was previously charged in ’90s with making terroristic threats in New Jersey

James had been arrested in Essex County, New Jersey, 27 years ago for making terroristic threats, according to the prosecutor’s office.

At the time, James, now 62, was charged with making terroristic threats during an incident in Fairfield, said Katherine Carter, a spokesperson for the Essex County Prosecutor’s Office. In the 1995 matter, James was convicted of the lesser charge of harassment and sentenced to probation for one year.