(CNN) The man arrested in connection to the New York subway shooting has a lengthy criminal history and had talked about violence and mass shootings in videos posted on YouTube -- including one uploaded as recently as Monday.
Frank James, 62, was arrested Wednesday by patrol officers in New York City's East Village, NYPD commissioner Keechant Sewell said.
The New York City Police Department said James is the suspect behind a mass shooting Tuesday that left 10 people with gunshot wounds and 19 other people injured in Brooklyn. Police believe none of the wounded have life-threatening injuries.
He is charged with violating a law that prohibits terrorist and other violent attacks against a mass transportation system, according to Breon Peace, US Attorney for the Eastern District of New York. The motive behind the shooting is still unknown.
James has been linked to rambling videos posted on a YouTube channel that has since been removed. A screenshot from one of the videos was used on an NYPD Crime Stoppers flyer seeking information about the shooting. In one video, he posts a City of New York ID card from a past educational training program.
James was known to New York City authorities before Tuesday's attack. He has nine prior arrests in the city dating from 1992 to 1998 for offenses including possession of burglary tools, a criminal sex act and theft of service, NYPD Chief of Detectives James Essig said in Wednesday news conference.
He has also been arrested three times in New Jersey, in 1991, 1992 and 2007 for trespass, larceny and disorderly conduct, Essig said.
However, James had no previous felony convictions so was able to purchase a gun, according to Essig.
Many of the videos that James uploaded to a YouTube channel included references to violence, including at a set group of people he believed had maligned him, in addition to broad societal and racial groups that he appeared to hate.
A YouTube spokesperson confirmed Wednesday the channel has been removed in accordance with its "creator responsibility guidelines" and the platform is "prominently surfacing videos from authoritative sources in search and recommendations."
CNN was able to analyze videos posted by the account before they were taken down.
In what appears to be his latest video posted Monday, James talks about someone who engaged in violence and ended up in jail. He said he could identify but talked about the consequences.
"I've been through a lot of s**t, where I can say I wanted to kill people. I wanted to watch people die right in front of my f**king face immediately. But I thought about the fact that, hey man, I don't want to go to no f**king prison."
James and his family didn't immediately respond to CNN's request for comment.
In one video posted online in February, James criticized a plan by New York City Mayor Eric Adams' administration to address safety and homelessness in the subway in part through an expanded presence of mental health professionals.
In that racist and rambling recording, James said the new effort was "doomed to fail" and described his own negative experience with city health workers during a "crisis of mental health back in the '90s '80s and '70s."
In a video posted last week, James, who is Black, rants about abuse in churches and racism in the workplace, using misogynistic and racist language.
After talking about community violence, James says, "We need to see more mass shootings. Yeah. ... We need to see more, there has to be more mass shootings to make a n***er understand. ... It's not about the shooter; it's about the environment in which he is, he has to exist."
That speech was a common theme throughout James' videos, in which he repeatedly espoused hatred toward African Americans.
In another video posted last month to the same channel, James said that he had post-traumatic stress. In that video, James said he left his home in Milwaukee on March 20. During the trip eastward, he said he was heading to the "danger zone."
"You know, it's triggering a lot of negative thoughts of course," he said in the video. "I do have a severe case of post-traumatic stress."
Preliminary information indicated James mentioned homelessness, New York City and its mayor in online posts, NYPD Commissioner Keechant Sewell said Tuesday. As a result, she said the city would increase the mayor's security.
Police released two photos of James at a news conference Tuesday night, including one that appeared to be a screengrab from a YouTube video.
Keys belonging to a U-Haul that had been rented under James' name in Philadelphia were found among the shooter's possessions at the shooting scene in Brooklyn, the NYPD said.
The videos give insight into James' path to the Northeast. He arrived in Philadelphia March 25 after stops in Fort Wayne, Indiana; Pittsburgh; and Newark, New Jersey.