A man who set off bombs in two US states has been sentenced to multiple terms of life in prison.
Ahmad Rahimi injured 30 people when one of his bombs, a pressure cooker device, blasted shrapnel in Manhattan's Chelsea neighbourhood in September 2016.
A second bomb planted nearby did not detonate.
That blast happened just hours after a small pipe bomb exploded along a Marine Corps road race in Seaside Heights, New Jersey, frightening participants but injuring no one.
The bombings triggered a two-day manhunt that ended in a shootout with police in Linden, New Jersey.
Rahimi, a naturalised US citizen who was born in Afghanistan and lived in New Jersey, was shot several times but survived.
Prosecutors said in court papers that Rahimi has not shown remorse and had tried to radicalise fellow prisoners at the New York jail where he has been held since his arrest.
"He is proud of what he did, scornful of the American justice system, and as dedicated as ever to his terrorist ideology," they wrote.
Rahimi, given a chance to speak at his sentencing, said: "I don't harbour hate for anyone."
Prosecutors said Rahimi gave inmates copies of terrorist propaganda and jihadist materials.
They included speeches and lectures by al-Qaida founder Osama bin Laden and Anwar al-Awlaki, a US-born cleric who inspired attacks on America and was killed in a US air strike in September 2011.
Rahimi also allowed some inmates to view materials on his laptop or provided electronic copies as he spread The Book of Jihad, bomb-making instructions and various issues of a propaganda magazine.
Defence lawyer Xavier Donaldson said Rahimi had once aspired to be a police officer and worked as a security guard after studying criminal justice at a community college.
"It was Mr Rahimi's belief that he could help people while employed in a position that would guarantee him some type of pension," the lawyer wrote.
While imprisoned, Rahimi has completed classes in business, entrepreneurship and drama, Mr Donaldson wrote.
A victim of the Manhattan blast confronted Rahimi in court after he was sentenced, telling him she is an immigrant too.
Pauline Nelson accepted Judge Richard Berman's invitation for victims of the attack to speak at the hearing.
Ms Nelson, of Brooklyn, was taken to hospital after the car she was driving was rocked by the explosion.
Standing several feet from Rahimi, Ms Nelson, who is originally from Trinidad, scolded him for not apologising to victims.
She looked him in the eye as she spoke and he stared back but said nothing.
Outside court, Ms Nelson said it brought her relief to confront him.
She said she is still frightened whenever she hears a siren.