Authorities in New York said on Monday that one person was in custody in what is being described as an "attempted terrorist attack" near the Port Authority Bus Terminal.

New York City Police Commissioner James O'Neill said a suspect was injured after he attempted to detonate an improvised explosive device.

O’Neill declined to provide details when asked if the suspect, whom officials identified as 27-year-old Akyed Ullah, claimed a connection to the Islamic State in Iraq and Syria.

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

NBC News reported that Ullah is from Bangladesh, a country not included in the Trump administration's latest travel ban, and came to the U.S. in 2011.

“Let’s be clear: This was an attempted terrorist attack," New York City Mayor Bill de Blasio (D) said in a televised press conference. 

Another official at the news conference said the device was modeled after a pipe bomb.

The New York Fire Department said three bystanders suffered minor injuries.

Officials said the A, C and E subway lines were evacuated as police investigated at 42nd Street and 8th Avenue.

The Port Authority Terminal is located in the middle of Manhattan, several blocks from Penn Station.

The Port Authority said it had "temporarily closed" the terminal because of the police presence.

Ellen Mitchell contributed to this breaking news report, which was last updated at 12:26 p.m.