Sign up for our COVID-19 newsletter to stay up-to-date on the latest coronavirus news throughout New York City

An explosion under the Port Authority Bus Terminal injured four people, including the suspect, on Monday, Dec. 11, 2017, police said. Photo Credit: Cooking with Granny

This story was reported by Nicole Brown, Lauren Cook. Rajvi Desai, Anthony M. DeStefano, Laura Figueroa, Lisa Irizarry, Michael O’Keefe, Ivan Pereira and Reuters. It was written by Brown, Cook and Irizarry.

A suspected ISIS-inspired terrorist detonated a homemade pipe bomb strapped to his body in the subway station under the Port Authority Bus Terminal, injuring himself and three others Monday morning, officials said.

Akayed Ullah, 27, was taken into custody following the explosion, which happened at about 7:20 a.m. in the underground passageway that connects Times Square and Eighth Avenue, NYPD Commissioner James O’Neill said.

The device, which only partially detonated, was set off by a Christmas ornamental light, a high-ranking law enforcement source said, adding that the pipe was 12 inches long and filled with powder and shrapnel. Ullah told police he assembled it in Brooklyn, the source said.

Ullah lives on East 48th Street in Flatlands and is originally from Bangladesh, an NYPD source said. He entered the country in 2011 using a passport that displayed an F43 family immigrant visa, according to White House Press Secretary Sarah Huckabee Sanders. He was admitted under a process in which immigrants already in the United States may sponsor family members, the Department of Homeland Security confirmed.

Ullah made statements to law enforcement indicating that he carried out the attack for ISIS, a law enforcement source said. He told investigators he acted alone and was inspired partly by al-Qaida’s online propaganda magazine Inspire, according to the high-ranking law enforcement source.

“This was an attempted terrorist attack,” de Blasio said at a news conference. “Thank God the perpetrator did not achieve his ultimate goals.”

Three people suffered minor injuries, including headaches and ear-ringing, and took themselves to area hospitals, the FDNY said. Ullah was injured as well, after the device, described by O’Neill as “low-tech,” went off. He was taken to NYC Health + Hospitals/Bellevue with burns to his abdomen and hands, officials said.

The device was strapped to Ullah with Velcro and zip ties, John Miller, NYPD deputy commissioner of intelligence and counterterrorism, said.

The pipe bomb detonated, but the pipe itself didn’t explode, and it didn’t cause any structural damage to the building, Gov. Andrew Cuomo told CNN. Investigators believe the time of the detonation was deliberate because Ullah seemed to be in a crowd of people when it went off, according to a police source.

A Port Authority police officer is being credited with taking Ullah into custody and holding him at the scene until the NYPD arrived, Port Authority Police Benevolent Association spokesman Bobby Egbert said.

The officer, Anthony Manferdini, was on patrol near the underground passageway when he saw people running. When he went to check out the cause of the stampede, he came across Ullah injured on the ground, according to Egbert.

Amid the smoke and chaos, Manferdini noticed wires coming from Ullah’s jacket as the man reached for a cellphone, Egbert said. Manferdini prevented Ullah from getting to the cellphone and three additional Port Authority officers — identified as Jack Collins, Sean Gallagher and Drew Preston — then helped secure the scene until the NYPD’s bomb squad arrived.

The subway station and bus terminal were evacuated shortly after the explosion.

“There was a stampede up the stairs to get out,” said one commuter, Diego Fernandez. “Everybody was scared and running and shouting.”

The Port Authority terminal, at Eighth Avenue between 40th and 42nd streets, is the main gateway for interstate buses into Manhattan and is the largest such facility in the United States and the busiest in the world. On an average weekday it serves about 7,000 buses and 220,000 people, and more than 65 million people annually.

Armed members of the NYPD’s Strategic Response Group fanned across the perimeter of the bus terminal blocking access to Eighth Avenue from 40th to 43rd streets.

FDNY trucks and NYPD emergency trucks were parked along the avenue for several blocks as stunned pedestrians shot photos and videos of the scene.

Christina Bethea, 29, of Yonkers, was aboard a No. 1 train that had just arrived at the 42nd Street stop when she said she heard a loud “boom.”

Bethea, who was heading to work as a security guard at a nearby building, said the sound was loud enough that it startled commuters. She described seeing smoke when she got on the platform, before she bolted upstairs and out of the station, as officers were running in.

“I didn’t know if it was an explosion, if it was someone being shot … everyone was confused,” Bethea said.

“The police vehicles came in under three minutes,” said Ralph Ledesma, 57, general manger at Gourmet New York on Eighth Avenue and 43rd Street.

Cuomo, who was at the news conference with de Blasio, said New York will always be a target for terrorists.

“The reality is that we are a target by many who would like to make a statement against democracy, against freedom,” he said.

Just two months before the explosion at Port Authority, a radicalized Uzbek immigrant drove a pickup truck into a bike path along the West Side Highway in lower Manhattan in the name of ISIS, killing eight people. About a year earlier, another radicalized man planted two bombs that detonated in Chelsea, injuring at least 30 people.

“In the course of the post-9/11 world, as you are aware, there’s also been approximately 26 plots that we can talk about that have been prevented through intelligence, investigation and intervention,” Miller said.

In the wake of the attack, the NYPD is likely to step up security screenings for New Year’s Eve in Times Square with more magnetometers and K-9 Unit coverage, a police official said.

President Donald Trump issued a lengthy statement Monday evening, calling for Congress to “enact legislative reforms to protect the American people.”

“First and foremost, as I have been saying since I first announced my candidacy for President, America must fix its lax immigration system, which allows far too many dangerous, inadequately vetted people to access our country,” Trump said in the statement, adding that Ullah had been able to live in the U.S. through an extended-family chain migration program.

“Congress must end chain migration,” Trump said. “Congress must also act on my administration’s other proposals to enhance domestic security, including increasing the number of Immigration and Customs Enforcement officers, enhancing the arrest and detention authorities for immigration officers, and ending fraud and abuse in our immigration system.”

The investigation caused street closures, and bus and subway disruptions in Manhattan. Even after the Port Authority reopened around 9:30 a.m., it warned bus customers to check with their carrier for current information on operations. New Jersey Transit outbound operations were normal by late morning, but Greyhound and airport service were suspended into the afternoon before resuming.

A, C and E trains were bypassing 42nd Street for hours after the explosion, but service at the station was restored by 2 p.m., the MTA said. The agency said 1, 2, 3, 7, N, Q, R and W service resumed at Times Square-42nd Street shortly after 11 a.m.

MTA chairman Joe Lhota credited the agency’s ability to restore service quickly to a similar counterterrorism exercise held in conjunction with the NYPD on Nov. 6.

As commuters headed back to the Port Authority Bus Terminal for the evening rush, the southside passageway leading to A, C and E trains was boarded up. MTA crews and police officers were instructing people to go outside, walk north and enter through another door in order to gain access to the uptown trains.

Standing on a subway platform at 42nd Street-Port Authority Monday evening, Penelope Tirado, 20, a college student from Washington Heights, said she had considered rerouting her commute but decided against it.

“It is normal but at the same time a little scary,” she said of being in the transit hub. “It makes you wonder if it will happen again, but I’m glad no one got badly hurt.”