A Bangladeshi immigrant who set off a pipe bomb in New York City's busiest subway station at rush hour was convicted Tuesday of terrorism charges.

The verdict against Akayed Ullah was returned in Manhattan federal court after a trial in which the defense 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 told 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."

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.

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

PIPE BOMB SUSPECT, TRACKED WITH DNA AND SOCIAL MEDIA POSTS, WAS SPINNING RECORDS AS FBI CLOSED IN

At trial, Ullah was confronted with his post-arrest statements and his social media comments, such as when he taunted President Donald 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.

In a statement on Tuesday, Manhattan U.S. Attorney Geoffrey Berman said 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."

"New York City remains a shining symbol of freedom and hope," Berman said.

The Associated Press contributed to this report.