NEW YORK -- A Bangladeshi immigrant convicted Tuesday of terrorism charges after setting off a pipe bomb in New York City's busiest subway station at rush hour told the trial judge he was angry at U.S. President Donald Trump and didn't carry out the attack for the Islamic State group.

The verdict against Akayed Ullah was returned in Manhattan federal court after a trial in which the defence maintained that he intended to kill only himself last Dec. 11. Nobody died, and most of the injuries were not serious.

After the verdict was announced and the jury left the room, Ullah spoke out, telling the judge: "I was angry with Donald Trump because he says he will bomb the Middle East and then he will protect his nation."

Judge Richard Sullivan told him: "Right now is not the time for a statement."

Ullah repeatedly told Sullivan he did not carry out the attack for the Islamic State group.

Sentencing was scheduled for April 5, when Ullah faces a mandatory 30-year prison sentence and could be sent to prison for life.

Prosecutors said he wanted to maim or kill commuters as part of a "lone wolf" terrorist attack on behalf of the terrorist organization. They disputed the defence 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.

The verdict capped a weeklong trial that featured surveillance video of Ullah the morning when his pipe bomb sputtered, seriously burning him in a corridor beneath Times Square and the Port Authority bus terminal, where most subway lines converge.

At trial, Ullah was confronted with his post-arrest statements and his social media comments, such as when he taunted Trump on Facebook before the attack. The president later demanded tightened immigration rules.

Authorities said Ullah's radicalization began in 2014 when he started viewing materials online, including a video instructing Islamic State supporters to carry out attacks in their homelands.

In closing arguments Monday, Assistant U.S. Attorney George Turner said Ullah told investigators after his arrest that he wanted to avenge U.S. aggression toward the Islamic State group and had chosen a busy weekday morning to attack so he could terrorize as many people as possible.

The prosecutor said Ullah, 28, of Brooklyn, followed the propaganda of the Islamic State group online and wanted to follow its instructions to carry out a "lone wolf" terror attack on Americans.

"His goal was to injure and kill innocent civilians, to terrorize," Turner said.

The prosecutor said Ullah told an investigator after his arrest: "I did it for the Islamic State."

Gallicchio, though, said Ullah purposefully chose an isolated corridor to set off his bomb because he only wanted to commit suicide.

"This is not a terrorist attack," she argued.

Assistant U.S. Attorney Shawn Crowley disputed the claim.

"It was about martyrdom, not suicide," she said.