NEW YORK (CBSNewYork) — The man serving life in prison for setting off a bomb in Chelsea nearly four years ago has been sentenced to an additional life term.

On Friday, a judge sentenced Ahmad Khan Rahimi for attempted murder.

READ MORE: Police: Worker Backed Into Corner, Groped On The Job At UES Ice Cream Shop

Rahimi got into a shootout with Linden, New Jersey, police during his arrest in the fall of 2016.

READ MORE: Police: Man Grabs Woman By Hair, Punches And Sexually Assaults Her At Bronx Playground

Officer Peter Hammer was shot in the head during the shootout, but miraculously survived.

Thirty people were injured in the Chelsea bombing.

MORE NEWS: 'Come From Away' Latest Broadway Hit To Welcome Back Audiences

A second bomb failed to explode.