A judge has sentenced a Bangladeshi immigrant whose pipe bomb mostly misfired in a busy New York City subway station in 2017 to life in prison, calling the crime “barbaric and heinous”.

Akayed Ullah was sentenced in Manhattan federal court by Judge Richard J Sullivan.

“A life sentence is appropriate,” Judge Sullivan said.

“It was a truly barbaric and heinous crime.”

Akayed Ullah
Akayed Ullah (New York City Taxi and Limousine Commission via AP)

Ullah, 31, apologised before hearing the sentence.

“Your honour, what I did, it was wrong,” he said.

“I can tell you from the bottom of my heart, I’m deeply sorry. … I do not support harming innocent people.”

Prosecutors had sought the life term for Ullah, saying the “premeditated and vicious” attack was committed on behalf of the so-called Islamic State group.

But defence lawyer Amy Gallicchio said Ullah deserved no more than the mandatory 35 years in prison.

She said he had “lived lawfully and peacefully” before the December 2017 attack that she blamed on a “personal crisis that left him isolated, depressed, vulnerable and suicidal”.

The attack in a pedestrian tunnel beneath Times Square and the Port Authority Bus Terminal left Ullah seriously burned after the bomb attached to his chest sputtered rather than burst, sparing some pedestrians nearby from serious injuries.

Police officers in December 2017 patrol in the passageway connecting New York City’s Port Authority bus terminal and the Times Square subway station, near the site of an explosion the previous day
Police officers in December 2017 patrol in the passageway connecting New York City’s Port Authority Bus Terminal and the Times Square subway station (Seth Wenig/AP)

At trial, prosecutors showed jurors Ullah’s post-arrest statements and social media comments, including when he taunted then-president Donald Trump on Facebook before the attack.

Hours after Ullah’s bombing attempt, Mr Trump derided the immigration system that had allowed Ullah – and multitudes of law-abiding Bangladeshis – to enter the US.

Ullah got an entry visa in 2011 because he had an uncle who was already a US citizen.

Mr Trump said allowing foreigners to follow relatives to the US was “incompatible with national security”.