A Sept. 17, 2016, surveillance video shows Ahmad Khan Rahimi in New York pulling a suitcase believed by prosecutors to contain a pressure-cooker bomb. (AP/AP)

A jury convicted a New Jersey man Monday in a bombing last year that injured 31 people and sparked a frantic two-state manhunt. The verdict means the bomber, Ahmad Khan Rahimi, is likely to spend the rest of his life in prison.

A jury in Manhattan federal court deliberated for just a few hours between Friday afternoon and Monday morning before finding Rahimi guilty of all eight counts against him for planting bombs in the Manhattan neighborhood of Chelsea on Sept. 17, 2016. One bomb left on a sidewalk did not explode, but another, left inside a metal trash container, detonated, causing the injuries.

U.S. Attorney Joon H. Kim called Rahimi's conviction "a victory for New York City, a victory for America in its fight against terror, and a victory for all who believe in the cause of justice.''

Rahimi chose not to testify in his defense, and in closing arguments his attorneys did not dispute some of the charges he faced — only the ones that with convictions would trigger a mandatory life prison sentence. His sentencing is scheduled for Jan. 18.

Prosecutors spent two weeks presenting the mangled metal dumpster and other evidence to the jury. Authorities say Rahimi, before planting bombs in New York, left a bomb that detonated, without injury, along the course of a five-kilometer charity race in Seaside Park, N.J. He also dumped a bag of pipe bombs outside a New Jersey train station before trying to disappear and evade police.

Rahimi was captured when police officers in Linden, N.J., found him sleeping in the doorway of a bar. Authorities say he pulled a gun from a waist pack and started shooting, striking one of the officers in his protective vest.

Prosecutors had a wide array of evidence to convince the panel, including fingerprints and records of his purchases of bomb parts.

Jurors watched security camera videos that showed him outside his residence on the day the bombs were planted, then showing the same person arriving at Penn Station in Manhattan. There was also video of his movements in the city and of him leaving one of the bombs on West 27th Street.

Among the most damning pieces of evidence was a letter written in a notebook Rahimi was carrying during his shootout with police. Stained by blood and torn in places, the letter is addressed to the U.S. government and describes his anger over U.S. foreign policy, indicates his admiration of Osama bin Laden and Anwar al-Awlaki, the Yemeni American cleric and propagandist, and ends with the declaration: "Inshallah the sounds of bombs will be heard in the streets. Gunshots to your police. Death to your OPPRESSION."

Rahimi is a U.S. citizen born in Afghanistan whose last name is sometimes spelled in government documents as Rahami. He faces separate charges in New Jersey for his alleged crimes there.

Counterterrorism officials have described Rahimi as a lone wolf who was not part of any broader conspiracy but was inspired by terrorist propaganda — much of it from overseas — and decided to act on his own. Prosecutors say a laptop in Rahimi's home contained 14 issues of al-Qaeda's Inspire magazine, which included various bombmaking recipes.

The Rahimi case also highlighted how difficult it can be to prevent such an attack, even when authorities have some inkling a person might be dangerous. The FBI briefly looked into Rahimi in 2014 after it learned his father had made comments to others indicating his son might be involved in terrorism. But that investigation ended after an FBI review found no links between Rahimi and terrorist groups.