A Bangladeshi man — reportedly inspired by ISIS — set off a pipe bomb inside New York’s Port Authority bus terminal during rush hour Monday morning, sowing mass chaos but causing few injuries — likely because the “attempted terrorist” detonated his “low-tech device” prematurely.

Akayed Ullah, 27, set off the “effectively low-tech device” in a subway passageway just before 7:30 a.m., New York Gov. Andrew Cuomo said in a news conference. Ullah, who lived in Brooklyn, suffered burns and wounds to his abdomen and hands, and appeared to be the only person seriously injured in the pipe bomb explosion, authorities said.

At least four other people suffered minor injuries, including ringing in the ears and headaches. Three have been released from the hospital, officials told Fox News.

The bomb was ignited with a Christmas light, matches and a nine-volt battery, law enforcement officials told The Associated Press. They said the short pipe was packed with explosive powder but didn't work as intended, and the blast wasn't powerful enough to turn the pipe into deadly shrapnel.

Ullah claimed he blew up his explosive device because he noticed a holiday picture in the hallway and was inspired by ISIS-style Christmas threats, two law enforcement officials told WNBC.

“This is New York, the reality is that we are a target by many who would like to make a statement against democracy, against freedom,” Cuomo said.

New York City Mayor Bill de Blasio said the explosion “was an attempted terrorist attack,” adding there was no additional known threat to New York City. Authorities are viewing transit system video that captured the incident.

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

Ullah’s attack was inspired by ISIS, but he had no direct contact with the terrorist group, law enforcement officials told the AP. When asked if Ullah made statements about ISIS, NYPD Commissioner James O’Neill said the suspect did make statements, but he did not go into detail about what was said.

Department of Homeland Security Press Secretary Tyler Houlton said in a statement that Ullah entered the U.S. in 2011 from Bangladesh on a chain migration visa. He had used a “passport displaying an F43 family immigrant visa in 2011.” He added the suspect “is a lawful permanent resident.”

Ullah strapped the crude pipe bomb to his body with Velcro and zip ties. The suspect allegedly packed the 5-inch metal pipe bomb and battery pack into the right side of his jacket, but the device exploded earlier than intended, law enforcement sources told The New York Post. The suspect said he made the bomb at his workplace, law enforcement sources told Fox News. He reportedly worked at an electrical company.

Cuomo told NY1 that officials “have reason to believe that [Ullah] went to the Internet and found out how to make a homemade bomb.” Law enforcement sources told Fox News that Ullah had “extensive overseas travel,” though there are no known coconspirators.

A large police presence was spotted soon after the explosion in a section of Brooklyn that boasts a significant Bangladeshi population.

According to WABC, the suspect's family released a strongly worded statement saying, “We are heartbroken by the violence that was targeted at our city today, and by the allegations being made against a member of our family. But we are also outraged by the behavior of law enforcement officials who have held children as small as four years old out in the cold and who held a teenager out of high school classes to interrogate him without a lawyer, without his parents. These are not the sorts of actions that we expect from our justice system, and we have every confidence that our justice system will find the truth behind this attack and that we will, in the end, be able to learn what occurred today. Thank you for your time.”

An NYPD source on the scene at Port Authority told Fox News a device went off, and there was a bomb strapped to a person. The Port Authority Police Benevolent Association said its officers — identified as Jack Collins, Sean Gallagher, Drew Preston and Anthony Manferdini — took down the suspect at gunpoint.

President Donald Trump in a statement blamed the country’s “lax immigration system, which allows far too many dangerous, inadequately vetted people to access our country.”

“Today’s terror suspect entered our country through extended-family chain migration, which is incompatible with national security,” the statement read. “My Executive action to restrict the entry of certain nationals from eight countries, which the Supreme Court recently allowed to take effect, is just one step forward in securing our immigration system. Congress must end chain migration.”

“The terrible harm that this flawed system inflicts on America’s security and economy has long been clear. I am determined to improve our immigration system to put our country and our people first,” the statement continued.

Monday’s explosion is the second ISIS-inspired attack in New York City in less than two months. An Oct. 31 terror attack killed eight people and injured 11 others after a man drove a rented truck into people walking and cycling on a bike path in Lower Manhattan.

Several people wrote on social media shortly after reports of Monday’s explosion that there was mass chaos at the bus terminal, some saying there was a “stampede” when the blast was heard.

A Greyhound bus driver told Fox News he heard a loud noise and soon was ordered by authorities to leave.

“I don’t argue with the guns,” the man said.

John, 25, was on his way to work when he heard about the explosion: “It’s sad to say but it’s just another day [here].”

“It’s crazy. It’s chaos right now,” said Lisa, 53, who was visiting New York City from Columbus, Ohio. “You do hear about it or see it, but I wasn’t expecting to see this on my run for Starbucks.”

Port Authority is the largest bus terminal in the U.S., and about 232,000 commuters go through the area daily. The number of passengers is expected to jump to 337,000 daily by 2040.

The terminal reopened Monday morning after it was temporarily closed. Several subway lines were halted and redirected to bypass Times Square and Port Authority after the incident.

Fox News’ John Roberts, Rick Leventhal and The Associated Press contributed to this report.