NYC terror suspect seems to have been prepared to die in attack, source says The 27-year-old suspect, Akayed Ullah, was badly injured from the explosion.

 -- The 27-year-old man who allegedly set off an explosive in the New York City subway system this morning seemed to have been prepared to die as a suicide bomber, a law enforcement source said.

The suspect, Akayed Ullah, 27, told authorities he is self-inspired from ISIS online propaganda, sources said. He said no one directed him to carry out the attack, a law enforcement said, adding that the suspect talked about the plight of Muslims over the years.

Ullah did not specifically say why he chose Times Square but indicated to authorities that ISIS and al-Qaeda propaganda mentioned Times Square as a possible venue for an attack. Ullah said he read al-Qaeda’s online magazine “Inspire” and used instructions from the internet to build the explosive.

Ullah was badly injured in the arm and torso from the explosive device that went off in his arms, sources said, and he has been hospitalized.

Five people were treated for minor injuries and have since been released, officials said. New York City Mayor Bill de Blasio called it an "attempted terrorist attack."

Ullah, originally from Bangladesh, entered the United States seven years ago on a family-based visa and has an address in Brooklyn, sources said, adding that he works as an electrician.

From 2012 to 2015, Ullah held a for-hire vehicle license, which allows a driver to operate a black car, livery cab or limousine, the NYC Taxi and Limousine Commission said. The license lapsed in March 2015 and was not renewed.

Before the device detonated at about 7:20 a.m. in a subway passageway between Times Square and the Port Authority Bus Terminal, Ullah wore the explosive strapped to him while he took the subway from Brooklyn into Manhattan, a law enforcement source said.

At 6:25 a.m., Ullah boarded the F train at the 18th Avenue station in Borough Park, the law enforcement source said. He then switched to the A at Jay Street and arrived at the 42nd Street/Port Authority station shortly before 7:20 a.m.

The explosive device had been assembled in the suspect's apartment, sources said.

A law enforcement source said the bomb was built from a 12-inch-long pipe, black powder and rigged with a 9-volt battery and a wire that came from a Christmas light. Because it was strapped to the suspect, the assumption is he had been prepared to die a suicide bomber, the source said. The pipe had nails stuffed into it, the source said, and it had the ability to impose more injuries than it did.

“This could have been worse,” a law enforcement source told ABC News.

However, the pipe did not fully shatter and a 6-inch piece was discovered fully intact.

Ullah is not expected to be charged this evening but eventually is set to face terror-related federal charges, a law enforcement source said.