The New York bombing suspect wrote 'Trump, you failed to protect your nation' on Facebook right before the attack, feds say

An undated photo provided by the New York City Taxi and Limousine Commission showing Akayed Ullah, the suspect in the Monday-morning bombing in New York City. New York City Taxi and Limousine Commission via Associated Press

Federal prosecutors on Tuesday charged Akayed Ullah with terrorism offenses and using a weapon of mass destruction in connection to the bombingin an underground passageway in New York City on Monday.

On the morning of the attack, Ullah posted on Facebook, "Trump you failed to protect your nation," according to the criminal complaint.

The federal complaint says that on the morning of the attack, Ullah, a 27-year-old Brooklyn resident originally from Bangladesh, posted a Facebook message saying, "Trump you failed to protect your nation."

The attack occurred in a narrow passageway connecting the Times Square and Port Authority subway stations in Manhattan at about 7:30 a.m. local time, according to the police. The explosion injured just three people in addition to Ullah, who was found lying on the ground at the scene and arrested.

Federal prosecutors on Tuesday also charged Ullah with bombing a place of public use, destroying property by means of fire of explosives, and using a destructive device during a violent crime.

Ullah told investigators in an interview from the Bellevue Hospital that he constructed the bomb and carried out the attack on behalf of the terrorist group ISIS, according to the complaint. Investigators said Ullah also posted another statement to Facebook before the attack that he "believed would be understood by members and supporters of ISIS to convey that Ullah carried out the attack in the name of ISIS."

Police officers also found a passport in Ullah's apartment that contained the handwritten message "O AMERICA, DIE IN YOUR RAGE," the complaint said.

Investigators believe Ullah was first radicalized around 2014 and began conducting internet research on how to build improvised explosive devices roughly one year ago. The complaint said Ullah viewed pro-ISIS materials online and watched a video instructing supporters to carry out attacks in their homeland if they were unable to travel overseas to join the terrorist group.

The complaint accuses Ullah of carrying out the attack "to terrorize as many people as possible," alleging that he chose to attack on a Monday in hopes of more people being present on a workday.

The pipe bomb used in the attack was filled with metal screws and attached to Ullah's body using zip ties, with a homemade detonator that included Christmas-tree lights, according to the complaint.