The man who is suspected of detonating a pipe bomb near Times Square in an attempted terror attack last month was indicted on terrorism and explosives charges Wednesday.

Akayed Ullah, 27, was charged with six counts, including providing and attempting to provide material support to the Islamic State, and using and attempting to use a weapon of mass destruction. Ullah, a Bangladeshi immigration, faces life in prison if he is convicted.

“In selecting this time and place, Ullah’s alleged purpose in the Port Authority bombing was painfully clear: to inflict as much damage as possible, and to strike fear into the hearts of New Yorkers in the name of ISIS,” U.S. Attorney Geoffrey Berman said in a statement.

Ullah is believed to have detonated a pipe bomb in a busy walkway connecting the Seventh Ave. subway lines and the Eighth Ave. subway lines near Times Square on the morning of Dec. 11.

Law enforcement described the device as “low-tech,” and said it was held together with Velcro and zip ties.

Ullah, of Brooklyn, was seen in surveillance video walking through the subway terminal before the blast, and then fell to the ground.

Four people, including Ullah, were injured in the explosion.

The 27-year-old was arrested, and law enforcement found components of the exploded pipe bomb on Ullah, including a nine-volt battery inside the pocket of his pants, and wires that were connected to the battery.

Ullah told officers he “did it for the Islamic State.” Law enforcement believes his radicalization began in 2014, and Ullah started looking into how to build improvised explosive devices online roughly one year before the December 2017 attack.

On the morning of the attempted terror attack, Ullah posted the statement “Trump you failed to protect your nation” to his Facebook page, according to the Justice Department.