NEW YORK — A man detonated an improvised explosive device in an underground passageway at a major commuter hub in New York City Monday morning, officials said. New York Police Commissioner James O’Neill identified the suspect as Akayed Ullah, 27, who sustained injuries from the blast and was in police custody.

New York Mayor Bill de Blasio said the incident was an attempted terror attack.

“Thank God the perpetrator did not achieve his ultimate goals,” de Blasio said.

The underground passageway in Manhattan connects the subway stations at Times Square and the Port Authority Bus Terminal and would have been packed with commuters during the morning rush.

A photo confirmed by CBS News 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.

O’Neill said three other people in the immediate area of the blast were also injured. Fire Commissioner Daniel Nigro said they suffered minor injuries consistent with being in the area of an explosion such as ringing in the ears and headaches. They transported themselves to area hospitals.

Nigro said the suspect sustained burns to his hands and abdomen in addition to lacerations. He was taken to a Manhattan hospital.

CBS News has learned that the suspect was from Bangladesh and had a second device.

White House press secretary Sarah Sanders said that President Trump had been briefed on the incident.

People reported seeing the bomb squad responding to the incident and posted images of the scene on social media.

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.”

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 – a surreal scene of still at what would ordinarily be a bustling rush hour.

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.

Subways were rerouted around the area but were expected to be back to normal by the evening rush, Metropolitan Transportation Authority Chairman Joe Lhota said.