NEW YORK (Reuters) - The Bangladeshi man accused of attempting a suicide bombing in a busy New York City commuter hub will remain in federal custody while he awaits trial on charges that include supporting a foreign terrorist organisation, a judge ruled on Wednesday.

Akayed Ullah, a 27-year-old supporter of the Islamic State militant group, appeared by video for a brief hearing from his bed in Bellevue Hospital, where he was recovering from injuries he suffered when his homemade bomb ignited but failed to detonate on Monday.

Ullah was covered with a white blanket and remained largely expressionless as Magistrate Judge Katharine Parker told him that he had a right to an attorney and did not have to make any statements.

Assistant U.S. Attorney Shawn Crowley asked that Ullah be detained without bail. Ullah’s court-appointed attorney, Amy Gallichio, did not dispute the request, meaning her client that will not be released on bail.

In addition to Ullah, three people suffered minor injuries when he attempted to detonate a pipe bomb secured to his midsection in a pedestrian tunnel under the sprawling Port Authority Bus Terminal transportation complex, where many commuters from New York’s suburbs arrive on buses and transfer to local subways.

“I did it for the Islamic State,” Ullah told police after the blast, according to papers filed by federal prosecutors.

Ullah, who has lived in the United States since 2011, began his self-radicalisation in 2014 when he started viewing pro-Islamic State materials online, prosecutors said. He carried out his attack because he was angry over U.S. policies in the Middle East, they said.

Inside Ullah’s passport, which was recovered from his home, were handwritten notes, including one that read, “O AMERICA, DIE IN YOUR RAGE.”

The charges he faces include providing material support to terrorists, use of a weapon of mass destruction and bombing a place of public use.

Slideshow ( 2 images )

Bangladesh’s counterterrorism chief told Reuters on Wednesday that his country had found no evidence linking the suspect to militants in his home country.

“We have collected evidence and information from his family members,” said Monirul Islam, head of the Bangladesh police’s counterterrorism unit. “In Bangladesh we have not found any connection or have not been able to identify any of his associates who were or are involved with any terrorist groups.”

The attack was the latest inspired by militants to hit the United States’ biggest city by population. In October, an Uzbek immigrant killed eight people by racing a rental truck down a bike bath.

Also in October, an Afghan-born U.S. citizen was convicted of planting two bombs in New York’s Chelsea neighbourhood in 2016, one of which exploded and wounded 30 people.