Police are searching for the motive behind an attempted terrorist attack on the New York subway, after a man with a home-made bomb strapped to his body set off an explosion during the morning commute.

The explosion injured five people including the suspect, named as 27-year-old Akayed Ullah by authorities. Ullah is said to be a Bangladesh national who lived in Brooklyn having arrived in the US in 2011 and become a permanent resident.

Officials are looking at all facets of Ullah’s life and the time leading up to the attack. Multiple reports said that Ullah had allegedly watched Isis propaganda, and suggested that he told investigators he pledged allegiance to the extremists. However it is believed there is no evidence yet that Ullah may have had direct contact with Isis, while no group has yet taken responsibility for the attack.

When asked at a news conference about the potential for a link to Isis, New York Police Commissioner Jim O’Neill merely said that the suspect had made “statements” that were the focus of the investigation.

There was said to be no information indicating Ullah was previously known to any US spy or law enforcement agency for any connection to militant groups.

He was was arrested and taken to hospital for treatment having suffered burns and lacerations on his hands and stomach. Three others, including a police officer, sustained minor injuries.

In a statement, President Donald Trump called it an “attempted mass murder attack” and called for those “convicted of engaging in acts of terror” to face the strongest possible penalty, including the death penalty.

Explosion in New York City Show all 14 1 /14 Explosion in New York City Explosion in New York City A fire truck arrives after a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City Port Authority Police watch as people evacuate after a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City Port Authority Police watch as people evacuate after a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City Police and other first responders respond to a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City Police and other first responders respond to a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City Police and other first responders respond to a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City FBI and police respond to a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City Police respond to a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City Police and other first responders respond to a reported explosion at the Port Authority Bus Terminal o AFP/Getty Images Explosion in New York City A fire truck arrives after a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City An armoured police truck occupies the street outside of the New York Port Authority in New York City, U.S. REUTERS Explosion in New York City Port Authority Police watch as people evacuate after a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City Police and other first responders respond to a reported explosion at the Port Authority Bus Terminal AFP/Getty Images Explosion in New York City Police and other first responders respond to a reported explosion at the Port Authority Bus Terminal AFP/Getty Images

Authorities were quick to point out that things could have been much worse, with the explosion coming in a crowded subway passage near Times Square at about 7.20am (12.20 GMT) during rush hour.

“This was an attempted terrorist attack,” New York Mayor Bill de Blasio said. “Thank God the perpetrator did not achieve his ultimate goals.”

CCTV cameras captured a man walking down the crowded passage, before the explosion which caused a plume of white smoke and scattered commuters who rushed to evacuate.

“There was a stampede up the stairs to get out,” said one commuter, Diego Fernandez. “Everybody was scared and running and shouting.”

It is not clear if the bomb was set off intentionally, near 42nd Street and 8th Avenue close to the Port Authority Bus Terminal, or if it went off prematurely.

New York state Governor Andrew Cuomo, speaking at a news conference near the explosion site, described the device as “amateur-level.” It had been attached to Ullah by Velcro and zip ties, having collected the materials for the bomb himself.

Mr Cuomo told CNN the explosive in the pipe ignited, but the pipe itself did not explode. “So he wound up hurting himself”. He added the attacker obtained information on how to make a bomb from the internet.

”This is one of my nightmares, right: a terrorist attack in the subway system,“ Mr Cuomo, a Democrat, later told TV channel NY1.

“The good news is: We were on top of it,” he said, and “the reality was not as bad as the fear.”

The incident occurred less than two months after an Uzbek immigrant allegedly killed eight people by driving down a New York cycle path in a rental truck. Isis did claim responsibility for that attack.

While subway service was restored and the area returned to a level of normalcy in the wake of the latest attack, it left its mark. “It’s worrying - something is always happening these days,” said Ashley Rodriguez, who was waiting outside the bus terminal with her younger brother.

Susana Concepcion said that she was waiting for a Greyhound bus to Philadelphia at the time of the attack, and saw three police officers rush past. She said she didn’t hear the blast, but was immediately told to leave alongside a number of others. “We didn’t know what was going on,” she said.

Investigators have searched a number of properties in Brooklyn said to be connected to Ullah, or his family as they look to piece together what might have led to the attack.

One, in the Flatlands neighbourhood, saw police block off the area and about a dozen officers milling about near the residence. Local residents said the street was quiet, with people mostly keeping themselves to themselves. One man, who did not want to be named said that Ullah had lived across the street and that he had seen him pacing around outside his home, talking on the phone and smoking cigarettes.

Another neighbour, JC Fouch, said that he had had no interaction with the suspect but that it was “kind of freaky” that he was living nearby.

Ullah was said to have came from the southeastern Bangladeshi district of Chittagong and last visited the country on September Inspector General of Police A K M Shahidul Hoque told Reuters on Monday.

He had no criminal record in Bangladesh, Mr Hoque said.

Having arrived in the US on an F-4 family immigrant visa in February 2011, from March 2012 through March 2015, he held a license to drive a limousine or black cab as an independent contractor, the New York City Taxi and Limousine Commission said in a statement. He is also believed to have done some work as an electrician.

As investigators piece together his life, Trump officials were quick to jump on the case to suggest it means that the US immigration system must be fixed. Getting tough on immigration has been one Mr Trump’s major promises since he was on the campaign trail for the White House.

In his statement, Mr Trump called for Congress to act to fix America’s “lax immigration system” by ending “chain migration” - where family members are permitted to join relatives who have immigrated. He linked chain migration to how Ullah entered the country.