A Bangladeshi immigrant who plotted to bomb New York City's busiest subway station was found guilty on terrorism charges Tuesday and then lashed out at President Donald Trump.

Akayed Ullah, 28, was found guilty on terrorism charges and now faces life in federal prison. Ullah planned to die in a failed Dec. 11 pipe bombing intended to maim or kill commuters. Ullah's attack occurred in a pathway underneath Times Square linking the subway to Manhattan's Port Authority bus terminal.

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

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

Ullah was found guilty on six charges, which included provision of material support and resources to a designated foreign terrorist organization, use of a weapon of mass destruction, and a terrorist attack against mass transportation systems.

Emergency service workers load Akayed Ullah, a 27-year-old Bangladeshi man suspecting of setting off a bomb at New York City's Port Authority Bus Terminal, into an ambulance on Dec. 11, 2017.

“Late last year, Akayed Ullah detonated a bomb during the bustle of morning rush hour under the Port Authority Bus Terminal," U.S. Attorney Geoffrey S. Berman said Tuesday. "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."

Berman said Ullah’s conviction was a unanimous jury decision and that the timing of the verdict, the day of midterms elections, "fittingly underscores the core principles of American democracy."

Assistant U.S. Attorney Rebekah Donaleski said that Ullah's bomb was strapped to this chest, loaded with metal screws to serve as shrapnel and triggered by a nine-volt battery in his pocket.

"He designed it. He built it. ... He picked the time. He picked the location," Donaleski said. His goal, she added, was "to terrorize Americans in the name of ISIS."

The crude pipe bomb — which also contained Christmas lights according to a criminal complaint — did not go off as planned but seriously burned Ullah in the process. No one else was injured.

Assistant U.S. Attorney George Turner said Ullah pledged allegiance to the Islamic State terrorist group prior to the attack, although Ullah's defense attorneys denied that in his trial. Ullah's attorney Julia Gatto said in her opening statements that there was no evidence Ullah took direction from the Islamic State and claimed prosecutors were overreaching in their charges.

Ullah, who has a green card, came to the United States in 2011 after his uncle won a visa lottery program and sponsored his nephew. He was "a deeply troubled young man who wanted to take his own life" to send a message about the mistreatment of Muslims, Gatto said.

Evidence against Ullah presented by the government included a Facebook posting he made while riding in the subway to Manhattan from Brooklyn on the morning of the attack that read, "Trump you failed to protect your nation."

Ullah also posted a statement that he believed would be understood by members and supporters of ISIS to convey that he carried out the attack in their name, according to a criminal complaint from January.