This file photo taken on October 13, 2016 shows bomber Ahmad Khan Rahimi attending the first court hearing on screen in Elizabeth, New Jersey while he remains in University Hospital in Newark. KENA BETANCUR / AFP

A New York jury on Monday convicted an American of Afghan descent for a bombing that wounded 31 people last year in a bustling Manhattan neighborhood.

Ahmad Khan Rahimi, 29, was found guilty on all eight counts linked to the homemade bombs he was accused of planting in Manhattan as well as New Jersey.

Rahimi faces a mandatory life term in prison when he is sentenced on January 18.

Following the two-week trial, the federal court jury rapidly returned its verdict on the charges, which included the use of a weapon of mass destruction and the bombing of a public place.

During the trial, a prosecutor called it a “miracle” that nobody was killed on the chaotic night of September 17, 2016.

One bomb exploded in Manhattan’s Chelsea neighborhood, lightly wounding 31 people.

Police defused a second device in Chelsea and found five additional pipe bombs in Rahimi’s hometown of Elizabeth, New Jersey.

The prosecution said police discovered a notebook containing references to slain Al-Qaeda leader Osama bin Laden and the Islamic State group after arresting Rahimi.

The FBI believes Rahimi acted alone and is not connected to any extremist groups.

“He believed he was a soldier in a holy war against America, and New Jersey and New York City was his battling ground,” Assistant US Attorney Shawn Crowley said during the trial.

Rahimi’s fingerprints were found on the debris of the bomb that exploded, while the unexploded munitions revealed “more than 40” of his other fingerprints, the prosecution said.

The bearded Rahimi pleaded not guilty.

He was seriously wounded in a shootout with police that culminated in his arrest two days after the blast.

New York Police chief James O’Neill on Monday said the verdict “is the most forceful deterrent for anyone considering waging terror in our city.”

New York has stepped up security with police deployed in force at numerous public sites since the attacks of September 11, 2001, which left nearly 3,000 people dead.

AFP