Akayed Ullah, the Islamic State jihadi who used a faulty homemade pipe bomb to attack one of New York City’s busiest subway stations on Monday, has been charged with terrorism by both federal and state authorities.

According to the federal charging document, Ullah wrote a Facebook post on Monday morning that said, “Trump you failed to protect your nation.”

“I did it for the Islamic State,” Ullah told federal investigators.

The federal charges against Ullah include the provision of material support and resources to a designated foreign terrorist organization, use of weapons of mass destruction, bombing a place of public use, destruction of property by means of fire or explosive, and use of a destructive device during and in furtherance of a crime of violence.

Investigators found a handwritten note reading “O AMERICA, DIE IN YOUR RAGE” scribbled on Ullah’s passport when they searched his apartment, along with more parts for homemade bombs, including metal pipes, screws to be used as shrapnel, and Christmas tree lights to serve as igniters.

The case against Ullah includes surveillance camera footage that shows him detonating his explosive device and falling to the ground.

According to the federal complaint, Ullah’s radicalization began at least three years ago when he “viewed pro-ISIS materials online, including a video instructing, in substance, that if supporters of ISIS were unable to travel overseas to join ISIS, they should carry out attacks in their homelands.” He began researching bomb construction about a year ago. It took him several weeks to assemble the bomb he used in the subway attack.

Earlier on Tuesday, Ullah was charged with criminal possession of a weapon, supporting an act of terrorism, and making a terroristic threat by the NYPD.