A man with a pipe bomb strapped to his body with Velcro and zip ties set off the crude device in the subway near Times Square on Monday, injuring him and three other people at the height of the morning rush hour.
All four were being treated for non-life-threatening injuries in what the mayor and police labeled an attempted terror attack.
The explosion happened in a long underground passageway that runs a full city block under 42nd Street between 7th and 8th Avenues. The 7:20 a.m. blast caused smoke to fill the passageway, which was crowded with Monday morning commuters.
Mayor Bill de Blasio and Police Commissioner James P. O'Neill labeled it an attempted terror attack.
"Thank God the perpetrator did not achieve his ultimate goals," de Blasio said.
The suspect was identified as 27-year-old Akayed Ullah.
Law enforcement officials said he was inspired by the Islamic State group but had apparently not had any direct contact with the group. The officials said he lives in Brooklyn and may be of Bangladeshi descent. The officials spoke to The Associated Press on condition of anonymity because they were not authorized to speak publicly about the blast.
Authorities said the bomb was a low-tech explosive device. They were investigating how it was made, and combing through surveillance footage that captured the blast on video.
A video posted on social media showed the security footage. In it, a man walks through the crowded pedestrian tunnel and the bomb suddenly going off in a plume of white smoke. Through the smoke, the suspect is then seen sprawled on the ground as bystanders flee.
Fire officials said the suspect had burns to his hands and abdomen. The others who were injured suffered ringing in ears and headaches.
Police are investigating whether Ullah intended to set off the device in the walkway, or whether he had meant to do it in a busier location.
A photo published by the New York Post showed a bearded man crumpled on the ground with his shirt apparently blown off and black soot covering his bare midriff. A police officer is holding the man's hands behind his back.
The explosion triggered a massive response by police and firefighters both above and below ground, tangling subway and bus service at the nearby Port Authority bus terminal.
Elrana Peralta, a customer service worker for Greyhound, said she works in the Port Authority terminal complex near where the blast happened, but didn't hear the explosion.
"All we could hear was the chaos," she said. "We could hear people yelling, 'Get out! Get out! Get out!'"
John Miles, 28, from Vermont, was waiting for a bus to Massachusetts. He also didn't hear the blast, but saw police react.
"I didn't know what was going on. Officers were running around. I was freaking out," he said. There was an announcement that people should take their bags and leave. "They didn't incite panic. It was fairly orderly."
New York has seen its share of terror attacks in recent years. On Oct. 31, a man drove a rented truck onto a bike path near the World Trade Center, killing eight people.
Video from above the "Crossroads of the World" showed lines of police and emergency vehicles, their lights flashing, lining the streets and no other vehicle traffic moving.
Everything around the Port Authority area was shut down for a few hours — a surreal scene of still at what would ordinarily be a bustling rush hour. But by 10 a.m., much of the area had returned to normal. Authorities said by evening rush hour everything would be re-opened.
New Jersey Transit buses headed to the Port Authority were diverting to other locations. NJ Transit said buses were taking passengers to Secaucus and Hoboken, where they could take trains into the city.
White House Press Secretary Sarah Sanders tweeted that President Donald Trump had been briefed on the explosion.