A US federal judge has ordered the man accused of this week's mass shooting in a New York City subway car to remain in custody, after prosecutors said his "terrifying" attack disrupted in the city in a way not seen in two decades.

The man, Frank James, suspected of injuring 23 people in the attack, made an initial court appearance today. He faces a federal charge of violently attacking a mass transit system.

James, 62, was represented by two public defenders, who requested that he undergo a psychiatric evaluation.

"The defendant terrifyingly opened fire on passengers in a crowded subway train," Assistant US Attorney Sara Winik said in court, adding that the incident interrupted "the morning commute in a way this city hasn't seen in more than 20 years."

"He fired approximately 33 rounds in cold blood at terrified passengers who had nowhere to run and nowhere to hide," she said in a court filing.

US Magistrate Judge Roanne Mann ordered James to be held at the Metropolitan Detention Center in Brooklyn, the main jail for defendants awaiting federal trial in New York City, pending a bail application from his lawyers.

James was arrested yesterday in lower Manhattan, capping a 30-hour manhunt for the lone suspect wanted in an assault that unnerved passengers of the largest and busiest US metropolitan rapid rail network and renewed calls for greater subway security.

James was taken into custody about 8km from the scene of Tuesday's assault, which unfolded during the morning rush-hour as the Manhattan-bound N train was pulling into an underground station in Brooklyn's Sunset Park community.

Police said 10 people were shot outright, five of them hospitalised in critical but stable condition, and 13 others were injured in the stampede of terrified passengers pouring from the smoke-filled subway car onto the platform of the 36th Street station.

All were expected to survive.

Scenes from the shooting incident on Tuesday

The gunman vanished in the pandemonium, but investigators said they established James as a suspect when a sweep of the crime scene turned up a credit card in his name and the keys to a U-Haul van that he had rented and left parked a several blocks away.

Authorities at the scene also recovered the Glock 9mm semi-automatic handgun used in the attack, along with three extended-ammunition magazines, a torch, a hatchet, a bag of fireworks and a container of gasoline, according to police and court documents.

The next day, investigators tracked James down to Manhattan's East Village neighborhood with the help of tips from residents who recognised him from wanted photos, some of whom posted sightings on social media, police said.

He was taken into custody without incident, according to officials.

Authorities have offered no possible motive for the assault. But according to an FBI affidavit filed in the case, James posted a number of YouTube videos addressing statements to New York City's mayor about homelessness and the subway system.

A YouTube account apparently belonging to James was taken down yesterday for violating the online video platform's "community guidelines," the company said.

A criminal complaint filed by federal prosecutors yesterday in US District Court in Brooklyn charged James with a single count of committing a terrorist or other violent attack against a mass transportation system - a felony that carries a maximum sentence of life in prison.

Brooklyn, New York on Tuesday

James, a Bronx native with recent addresses in Philadelphia and Milwaukee, had nine prior arrests in New York and three in New Jersey, according to the New York Police Department.

The subway shooting suspect, described by eyewitnesses as dressed in construction-worker garb, is accused of setting off two smoke canisters from the rear of the subway car moments before opening fire on fellow passengers.

In addition to items found at the subway station, searches of James' apartment and a storage locker in Philadelphia uncovered more handgun and rifle magazines, ammunition, a Taser and a pistol barrel attachment for a silencer, the FBI said.