NEW YORK (CBSNewYork) — A calm commute Monday morning turned into chaos when police said a crude homemade pipe bomb exploded in an underground walkway near the Port Authority Bus Terminal, injuring at least five people.

Police said the “terror-related” incident happened around 7:20 a.m. in the passageway on West 42nd Street between 7th and 8th avenues, which connects the Port Authority Bus Terminal to the Times Square subway station.

Surveillance video from the scene shows a cloud of smoke filling the underground walkway after police said 27-year-old Akayed Ullah’s homemade device exploded.

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

The device was attached to his body using Velcro and zip ties, NYPD Deputy Police Commissioner John Miller said. Sources say the bomb only partially detonated after malfunctioning.

EXTRAS: Traffic/Transit Changes | Videos | Photos

“The preliminary investigation at the scene indicates that this male was wearing an improvised explosive device attached to his body,” O’Neill said. “This device was intentionally detonated by the subject.”

Video from the underground hallway shows the moment the device exploded. Investigators believe it detonated after Ullah touched two wires together, closing an electrical circuit possibly made with Christmas light wires attached to a nine-volt battery. A short piece of metal pipe was packed with low intensity explosive material and a handful of screws intended to cause injury.

Port Authority police moved quickly and strategically, arresting Ullah at gunpoint on the spot. Officers Sean Gallagher, Drew Preston, Jack Collins, and Anthony Manfredini rushed in to subdue the injured suspect and remove his bomb vest.

“The right cops were in the right place this morning,” Port Authority Patrolman Benevolent Association President Paul Nunziato said.

O’Neill said Ullah had burns and wounds to his body and was taken to NYC Health + Hospitals/Bellevue, where steel barriers blocked off the driveway and about a dozen police officers stood guard outside.

In a statement sent to CBS2 late Monday on behalf of the Ullah family, Council on American-Islamic Relations New York chapter Albert Fox Cahn said the family is “heartbroken by this attack on our city today and by the allegations being made against a member of our family.”

“Our family like all families is committed to the safety and wellbeing of all New Yorkers. But we are also outraged by the behavior of law enforcement officials during this investigation,” the statement continued. “Today, we have seen our children, as young as 4 years old, held out in the cold, detained as their parents were questioned. One teenage relative was pulled out of high school classes and interrogated without a lawyer, without his parents. These are not the actions that we expect from our justice system, and we hope to see better in the days and weeks to come.”

At least five other people who were in the area of the blast were also hurt. Authorities said they all took themselves to the hospital with minor injuries and were sent home to recover by late Monday evening.

Veronica Chavez was with her son Alex after being treated for ringing in her ears. He translated her defiant words to CBS2’s John Dias.

“Nothing is going to change,” she said. “I will still eventually go back to work. We can’t be scared.”

Now hearing three minor injuries in addition to suspect at #PortAuthority . He was wearing improvised explosive device. @wcbs880 pic.twitter.com/gHd1vu0lmz — Marla Diamond (@MDiamond8) December 11, 2017

The incident essentially put Manhattan on lockdown, initially shutting down subway service on multiple lines through the area and several major roads across the city, including the West Side Highway.

Heavily armed NYPD units could be seen patrolling the streets outside the bus terminal on 42nd Street at 8th Avenue.

Bomb-sniffing K-9 units and counterterrorism officers were also brought in to survey the scene. The normally busy area was empty after police evacuated the area.

Police say the suspect is of Bangladeshi descent and has lived in Brooklyn for the past several years.

“He did make statements but we’re not going to talk about that right now,” O’Neill said.

Sources say Ullah told investigators he was inspired to strike by the terror group ISIS, but authorities were working to determine whether he had any direct connection with the group.

Speaking from the scene, New York Gov. Andrew Cuomo acknowledged that New York City is “an international target,” but said terrorists will not win, 1010 WINS’ Juliet Papa reported.

“The reality is we are a target by many who would like to make a statement against democracy, against freedom,” he said. “We’re not going allow them to disrupt us. That is exactly what they want and that is exactly what they’re not going to get.”

.@nyc311: If unable to reach someone who may have been impacted by the incident today @ Port Authority Bus Terminal call 311. — NYCEM – Notify NYC (@NotifyNYC) December 11, 2017

Police said New Yorkers should also expect to see a greater police presence throughout the city, but said there are no other specific and credible threats at this time.

“I think it’s wonderful they haven’t shut it down. They’ve opened it up, they did what they had to do, and New Yorkers are gonna keep moving on and not let something like this stop them,” commuter James Blihar said.

White House Press Secretary Sarah Sanders tweeted Monday morning that President Donald Trump was briefed on the situation.

.@POTUS has been briefed on the explosion in New York City — Sarah Sanders (@PressSec) December 11, 2017

Sanders followed up during the afternoon White House press briefing to call the incident terrorism and praise responders on the scenes.

“These brave first responders and other who rushed to the scene are heroes. On behalf of the president and a grateful nation, we would like to thank them and commend them for their bravery.

“This attack underscores the need for Congress to work with the president on immigration reform that enhance our national security and public safety,” Sanders added. “We must protect our borders, we must insure that individuals entering our country are not coming to do harm to our people, and we must move to a merit-based system of immigration.”

Security expert Manny Gomez spoke to CBS2 about the possibility that the suspect was a suicide bomber.

“We don’t know yet but if it was that would be a game changer because that has not happened within the continental U.S.,” he said.

Monday’s incident came just weeks after police said a man drove a rented pick-up truck down the West Side highway bicycle path, killing eight people and injuring a dozen others on Halloween.