In this artist's drawing, Ahmad Khan Rahimi appears in a New York courtroom to face federal terrorism charges on Nov. 10. (Elizabeth Williams/Associated Press)

Federal prosecutors in Manhattan on Wednesday indicted Ahmad Khan Rahimi, the man accused of planting two pressure-cooker bombs in New York City in September, one of which exploded and injured more than 30 people.

Rahimi, 28, of Elizabeth, N.J., could face a mandatory life sentence.

Rahimi was also charged in September by federal prosecutors in New Jersey with setting off a bomb along the course of a Marine Corps charity race in Seaside Park. Investigators also found explosive devices in a backpack left by Rahimi at a New Jersey train station.

The weekend bombings launched the biggest domestic terrorism investigation in the metropolitan area in years.

The Justice Department decided to allow prosecutors in the Southern District of New York to proceed with their case first. Rahimi, who was transferred to Manhattan from a New Jersey detention facility, is scheduled to be arraigned on Thursday. He is expected to plead not guilty.

Rahimi, a naturalized U.S. citizen and Afghanistan native, was charged with eight counts. They include bombing a place of public use, destroying property by means of explosive, interstate transport of explosives, using and attempting to use a weapon of mass destruction, and two counts of using a destructive device in furtherance of a crime of violence. The last two counts carry mandatory life terms, if he is convicted of both.

Rahimi was captured in New Jersey in a dramatic shootout with police two days after the first bomb went off. He fired multiple shots at police, injuring several police officers, before he was himself shot and placed under arrest, authorities said. He suffered serious injuries that kept him hospitalized for weeks and made interviews with investigators difficult. He was also charged in state court.

Rahimi made his first federal court appearance last week in Manhattan to face the federal terrorism charges. His lawyer, David E. Patton, expressed concerns that the Metropolitan Correctional Center, where Rahimi is being held, would not be able to provide adequate care for his wounds.

According to Patton, Rahimi was shot about a half-dozen times and has undergone eight to 10 surgeries since his arrest. His injuries included liver damage and infections, he said. And he has lost the use of his left hand.

Federal authorities have not said whether they believe Rahimi worked with others overseas or received training abroad. Rahimi had made trips to Afghanistan and Pakistan between 2011 and 2014.

When he was arrested, authorities found on him a handwritten journal that included, among other things, laudatory references to Osama bin Laden and Anwar al-Awlaki, a former senior leader of an al-Qaeda affiliate in Yemen, as well as to Nidal Malik Hasan, who shot and killed 13 people at Fort Hood, Tex., in 2009.

In the journal, Rahimi also fretted that he would be captured before being able to carry out a suicide attack. In one line, he wrote that, God willing, “the sounds of the bombs will be heard in the streets.”

According to the FBI complaint filed in September, Rahimi had planned the attacks in New York and New Jersey for months and conducted a dry run shortly before executing them.