Alleged Chelsea bomber Ahmad Khan Rahimi was indicted Wednesday in federal court in Manhattan on eight explosives and terrorism-related counts that could lead to a mandatory life sentence.

The indictment largely tracked a criminal complaint filed against Rahimi last month in New York, but added two counts of using a destructive device during a crime of violence — one for each of two bombs he’s accused of planting in Manhattan — that could require life in prison if he is convicted on both.

“The bomb that exploded in Chelsea shattered windows hundreds of yards away and propelled a 100-pound trash bin over 120 feet, injuring over 30 people,” Manhattan U.S. Attorney Preet Bharara said in a statement. “Now indicted by a grand jury, Rahimi will face justice in a federal court for his alleged violent acts of terrorism.”

Rahimi, 28, of Elizabeth, New Jersey, is accused of planting a bomb on West 23d Street that exploded, and another on West 27th Street that didn’t on Sept. 17. He also planted bombs in New Jersey, and on Sept. 19 was captured in Linden, New Jersey, after a shootout with police there.

After being hospitalized in New Jersey for more than a month, he was brought to Manhattan federal court for an initial appearance last week, and will be in court again on Thursday to enter a plea to the indictment.

He has also been charged with bomb-related offenses that could carry a mandatory life sentence in New Jersey federal court, and with attempted murder of police officers in New Jersey state court. But the Manhattan case will be tried first.

advertisement | advertise on newsday

Rahimi also is charged in Manhattan with using a weapon of mass destruction and attempting to do so, bombing a place of public use, destroying property by means of explosive and attempting to do so, and interstate transportation of explosives.

Lawyers for Rahimi did not respond to a request for comment.