NEW YORK _ The accused Port Authority bomber posted a taunting message to President Donald Trump in the hours before the attack, authorities said Tuesday.
"Trump you failed to protect your nation," Akayed Ullah, 27, wrote on Facebook early Monday, authorities said, according to his federal complaint.
The glimpse into Ullah's murderous mind was revealed hours after he was hit with federal charges for the rush-hour attack designed to "terrorize as many people as possible," the complaint says.
Prosecutors say the Islamic State-inspired former livery cab driver detonated a crude pipe bomb strapped to his chest while walking through a Port Authority tunnel Monday morning.
Investigators scouring Ullah's Brooklyn home turned up a passport in his name with multiple handwritten notes, including "O AMERICA, DIE IN YOUR RAGE," the complaint says.
The investigators also found metal pipes, Christmas light fragments and screws that matched the items used in the crudely constructed bomb found at the scene, the complaint says.
In interviews with investigators, the Bangladeshi man said he carried out the attack in part as retaliation for U.S. government policies in the Middle East.
"I did it for the Islamic State," Ullah told police, the complaint says.
The failed suicide bomber also told investigators that he targeted the underground tunnel linking Times Square to Port Authority to inflict maximum carnage.
"One of Ullah's goals in carrying out the December 11 attack was to terrorize as many people as possible," his complaint says.
"He chose to carry out the attack on a workday because he believed that there would be more people."
The seeds of Ullah's radicalization were sown around 2014 when he started watching Islamic State videos online.
Ullah told police he began doing online research on how to build homemade explosives about a year ago.
He dedicated himself to attacking the U.S. after seeing instructions that "if supporters of ISIS were unable to travel overseas to join ISIS, they should carry out attacks in their homelands," the complaint says, using an acronym for Islamic State.
Ullah gathered together the materials for his bomb about two to three weeks ago. He built it in his Brooklyn apartment roughly a week before the attack, the complaint says.
Federal prosecutors charged Ullah with a total of five counts, including providing material support to a terrorist group and use of weapons of mass destruction.
The failed suicide bomber was severely injured in the 7:20 a.m. blast Monday, but the bomb failed to detonate fully.
Three others suffered minor injuries in the rush-hour attack that triggered panic and chaos in the heart of Midtown.
Ullah, who is recovering from burns and cuts to his hands and stomach at Bellevue Hospital, could be arraigned as early as Tuesday afternoon.
Earlier Tuesday, the Port Authority police hit Ullah with several state charges _ including weapons possession, supporting an act of terrorism and making a terroristic threat.
But the case is expected to be prosecuted by the U.S. Attorney's office.
Police sources said on Monday that Ullah admitted to detonating the device when he saw a Christmas poster in the tunnel, sources said. He told investigators he was angry about airstrikes against Islamic State targets in Iraq and Syria.
Ullah said that he was inspired by the militant group but had not gotten direct orders from the terror group, sources said Monday.