Frank R. James, the alleged gunman who shot ten people aboard a Brooklyn subway this week, was ordered held without bail Thursday, after prosecutors warned the 62-year-old posed a "severe and ongoing danger to the community."

James appeared in Brooklyn Federal Court to face charges of terrorism on mass transit, one day after he was arrested in the East Village. If convicted, he faces life in prison.

His attorney, Mia Eisner, waived his right to bail and requested a psychiatric evaluation. He will be detained at the Metropolitan Detention Center in Sunset Park, Brooklyn, roughly half a mile from where Tuesday’s mass shooting unfolded.

James was arrested Wednesday, after telling an NYPD tip line that he could be found outside an East Village McDonald’s, according to a senior law enforcement source.

In a memo prior to the hearing, prosecutors warned that James had a “stockpile of weapons and other dangerous items stored in various locations that he controls,” including a high-capacity rifle magazine at his previous apartment in Philadelphia and a propane tank inside his U-Haul truck discovered in South Brooklyn.

“The defendant’s attack was premeditated, carefully planned, and it caused terror among the victims and our entire city,” Assistant U.S. Attorney Sara Winik told Judge Roanne L. Mann at the hearing.

Read the full complaint here:

Prosecutors also cited videos James uploaded to YouTube, where he ranted about the rise of homeless people on the subway and spoke at times about his desire to get a gun and start shooting people.

Federal filings also offered new details on the lead-up and aftermath of the attacks, which left a total of 30 people suffering from injuries including gunshot wounds, smoke inhalation and injuries sustained attempting to flee the train and platform.

Prosecutors said James drove a U-Haul van from Philadelphia to New York, crossing the Verrazano Bridge shortly after 4:00 a.m. on Tuesday. Two hours later, surveillance footage captured a man matching James' description parking the van on Kings Highway, a few blocks from the entrance to the N train.

James allegedly boarded the train at Kings Highway with a bag containing his Glock handgun, fireworks and smoke-emitting devices that he threw before opening fire inside the subway as it reached 36th Street.

A bag of smoke grenades and fireworks shooting suspect Frank James used as diversion before opening fire

A bag of smoke grenades and fireworks shooting suspect Frank James used as diversion before opening fire

A bag of smoke grenades and fireworks shooting suspect Frank James used as diversion before opening fire
U.S. Attorney's Office

He is believed to have boarded an R train across the platform, where several of his victims had fled and were receiving medical attention. He rode the train one stop, then exited at 25th Street R station, according to surveillance footage.

Among the items found at the scene of the attack that led authorities to the suspect was the key to a rented U-Haul van, a bank card registered in James’ name and a receipt to a storage facility in Philadelphia.

Investigators raided that facility and an apartment James rented in Philadelphia for a two-week period. Inside they found several types of ammunition, including a magazine used in a semi-automatic AR-15 rifle, a taser, a high-capacity rifle magazine and a blue smoke bomb, according to federal filings.

But his whereabouts in the aftermath of the shooting, as he eluded police for close to 30 hours, are still coming into focus. For at least some of that time, he appeared to be wandering the streets of Manhattan.

Sabrina De Sousa, the owner of Dimes, a Lower East Side cafe, said she saw a man that matched the shooter’s description sitting with a duffel bag at one of the restaurant’s benches at around 10:30 a.m. on Wednesday.

“He didn't seem totally well,” De Sousa told Gothamist. “He was just kind of staring into space, in a daze, not engaging with his surroundings.”

Uncertain that she was looking at the right person, De Sousa decided not to call the police.

When James was apprehended in the East Village nearly four hours later, the owner spoke to investigating officers, who confirmed through surveillance footage that James had made a pit stop at Dimes.

“I mean what are the odds,” De Sousa said. “I guess we can take the trains again.”

Daniel Shapiro contributed reporting.

Clarification: A previous version of this story mischaracterized the nature of De Sousa's conversation with police.

A timeline of Frank R. James' alleged movements before and after the shooting