The man accused of opening fire aboard a rush hour N train pulling into the Sunset Park station in April now faces terrorism and firearm charges that carry a maximum penalty of 11 life sentences, according to a new indictment filed Friday by federal prosecutors in Brooklyn.

Frank James, 62, is accused of being the gunman who shot 10 commuters and created a chaotic scene that injured dozens on April 12.

A federal grand jury opted Friday to charge James with 10 counts of “terrorist attack and other violence against a mass transportation system and vehicle carrying passengers and employees.” He also faces one charge of discharging a firearm during a violent crime.

James initially pleaded not guilty to one charge of a terrorist attack on a mass transit system and one firearm charge in May. The charges filed on Friday are part of a superseding indictment, replacing the initial charges.

His attorney could not be immediately reached for comment.

According to a criminal complaint from April, prosecutors alleged James entered the city just after 4 a.m. on April 12, crossing the Verrazzano-Narrows Bridge in a rented U-Haul he later abandoned. At 8:24 a.m., aboard a northbound N train, he set off two smoke grenades and began firing at passengers, police alleged after arresting James the following day.

James fired a 9 mm Glock handgun 33 times, NYPD Chief of Detectives James Essig said on April 13.

A report released Thursday said poor training, insufficient staffing and disorganization within the MTA led to a failure to fix malfunctioning cameras at three N train subway stations, including the station where the attack took place. The MTA captured images of James from separate cameras, which it provided to the NYPD, but failed to capture him exiting the subway system.

James was taken into custody by police nearly 30 hours after allegedly opening fire, thanks in part to tips from New Yorkers who spotted him in the East Village.