(CNN) — Frank James, who opened fire on a crowded New York City subway train last April, wounding 10 people, pleaded guilty in federal court Tuesday to terrorism charges.

After initially pleading not guilty last May, James, 62, on Tuesday admitted to 10 counts — one for reach gunshot victim — of committing a terrorist attack and other violence against a mass transportation system and vehicle carrying passengers and employees. He also pleaded guilty to one count of discharging a firearm during a crime of violence.

James’ plea comes nearly nine months after prosecutors said he put on a gas mask, set off a smoke device and fired a handgun at least 33 times on a crowded N train traveling toward the 36th Street station in Brooklyn’s Sunset Park neighborhood on April 12. Along with the 10 people wounded by gunfire, others were injured by the smoke. In all, 29 people were hospitalized.

James is expected to be sentenced at a later date, according to a spokesperson with the US Attorney’s Office. He faces a maximum sentence of life in prison, but prosecutors are willing to recommend a sentence in the range of 31 to 37 years in prison if James shows enough remorse, per a letter from Breon Peace, United States Attorney for the Eastern District of New York, to District Court Judge William Kuntz.

If James “does not clearly demonstrate acceptance of responsibility,” prosecutors will recommend a sentence of 40 years to life, the letter said.

The shooting rattled the city, which was already on edge as commuters started to return to the subway following the Covid-19 pandemic.

One of the wounded, Hourari Benkada, 27, said he was on the N train and sat next to a man with a duffel bag and reflective vest who let off a “smoke bomb.”

“And all you see (is) smoke — black smoke … going off, and then people bum-rushing to the back,” Benkada said. “This pregnant woman was in front of me. I was trying to help her. I didn’t know there were shots at first. I just thought it was a black smoke bomb.

“She said, ‘I’m pregnant with a baby.’ I hugged her. And then the bum-rush continued. I got pushed, and that’s when I got shot in the back of my knee.”

James was arrested a day later in Manhattan’s Lower East Side after calling in a tip on himself. Items left behind at the scene, including a credit card, a set of keys, a construction jacket and a gun — were tied back to James by investigators.

The accused has a lengthy criminal history and had posted rambling videos on a YouTube channel in which he talked about violence and mass shootings, and said he’s thought about killing people who have presumably hurt him.

In one posted just a day before the shootings, James talked 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.”

In another video posted in February criticizing New York Mayor Eric Adams’ plan to address safety and homelessness in the subway, James spoke about his negative experience with city health workers during a “crisis of mental health back in the ’90s ’80s and ’70s.”

(Copyright (c) 2024 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox