NEW YORK (CBSNewYork/AP) – The man accused of setting off a poorly constructed pipe bomb near the Port Authority Bus Terminal was convicted on terrorism charges Tuesday.

A jury found that Akayed Ullah, a Bangladeshi immigrant, strapped the bomb to his body and partially detonated the device inside a passageway that links the Times Square subway station to the bus terminal in Midtown.

He told authorities he “did it for the Islamic State,” according to a federal criminal complaint.

Watch: Pipe Bomb Partially Explodes Near Port Authority Bus Terminal 

Ullah was indicted on five counts in the December 2017 attack, including providing material support to terrorists and using a weapon of mass destruction. He pleaded not guilty in January.

He was hospitalized with serious burns after the attack. Five other people suffered minor injuries.

The defense said Ullah intended to kill only himself last Dec. 11. Nobody died and most of the injuries were not serious.

Prosecutors said he wanted to maim or kill commuters as part of a “lone wolf” terrorist attack on behalf of the Islamic State group.

They disputed the defense claim, saying Ullah would not have worn a bomb had he wanted to kill only himself.

They also cited social media postings by Ullah as well as comments he made after his arrest to investigators.

“Ullah’s sinister purpose was to harm and terrorize as many innocent people in his path as possible, by using deadly violence to make a political statement,” said U.S. Attorney Geoffrey S. Berman after the verdict. “Ullah’s conviction by a unanimous jury of New Yorkers falls on an Election Day, which fittingly underscores the core principles of American democracy and spirit: Americans engage in the political process through votes, not violence.

Authorities said Ullah, who lived in Brooklyn, moved to the United States on an immigrant visa in 2011 before later becoming a legal, permanent resident.

(© Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)