Investigators said it was not clear if the bomb was set off intentionally or went off prematurely.
“This was an attempted terrorist attack,” New York’s mayor, Bill de Blasio, said. “Thank God the perpetrator did not achieve his ultimate goals.”
The suspect, who was arrested and later identified as Akayed Ullah, 27, was being treated at a hospital for burns to his hands and abdomen.
Law enforcement officials said Ullah was inspired by the Islamic State group but had apparently not had any direct contact with the terrorist organisation.
The explosion, which happened in a subway passageway under 42nd Street between Seventh and Eighth avenues, triggered a massive emergency response by police and firefighters both above and below ground, affecting subway and bus services at the nearby Port Authority bus terminal. Everything around Times Square was shut down.
Authorities said the bomb was a low-tech explosive device attached to the man with Velcro and cable ties. Last night they were still investigating exactly how it was made.
A photograph 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 was holding the man’s hands behind his back.
Another photograph shown on cable channel NY1 showed the bearded suspect, wide-eyed, on a stretcher being loaded into an ambulance.
Elrana Peralta, a customer service worker for Greyhound, who works in the Port Authority terminal complex, said: “All we could hear was the chaos. 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 did not hear the blast either, but saw police react. He said: “I didn’t know what was going on. Officers were running around. I was freaking out.”
White House press secretary Sarah Huckabee Sanders tweeted that President Donald Trump had been briefed on the explosion.