Ahmad Khan Rahami, 28, is wanted by law enforcement in connection with the explosion Saturday night in the Chelsea section of Manhattan that injured 29 people. Rahami could be armed and dangerous.

NEW JERSEY (FOX5NY) - A pipe bomb found in a trash can near a New Jersey train station exploded early Monday as a bomb squad was attempting to disarm it with a robot, officials said.

Elizabeth Mayor Christian Bollwage said that the FBI was working to disarm one of five devices found in the same bag, which was discovered in a trash can by two homeless men around 8:30 p.m. Sunday, near the Elizabeth train station on New Jersey Transit's Northeast Corridor rail line. The men had reported seeing wires and a pipe coming out of the package, Bollwage said.

The homeless men were going through the trash can looking for anything of value when they found the bag. The men realized the danger and took the bag to an area away from the train station and then alerted police.

The mayor said that the two homeless men should be considered heroes for their actions.

There was no immediate report of injuries or damage.

A search warrant was executed Monday morning at 104 Elmora Ave. off Linden Ave. at "First American Fried Chicken,' restaurant owned by the family of bombing suspect Ahmad Khan Rahami.

He was taken into custody following a shoot-out with police in Linden, New Jersey late Monday morning.

NJ Transit service was suspended early Monday between Newark Liberty Airport and Elizabeth, and New Jersey-bound Amtrak trains were being held at New York Penn Station, officials said, while New York-bound Amtrak trains were being held in Trenton. Service was restored at approximately 6 a.m.

Train passengers reported being stuck on Amtrak and NJ Transit trains for hours Sunday night, while some trains moved in reverse to let passengers off at other stations. Amtrak said 2,400 passengers were affected and that trains were being brought into other stations for people to get other transportation.

The discovery of the suspicious package came a day after an explosion in Manhattan injured 29 people, and an unexploded pressure-cooker device was found four blocks away. Also Saturday, a pipe bomb exploded about an hour from the Elizabeth train station in Seaside Park, New Jersey, forcing the cancelation of a military charity 5K run.

"I'm extremely concerned for the residents of the community, but more importantly extremely concerned for everyone in the state and country where someone can just go and drop a backpack into a garbage can that has multiple explosives in it with no timers and then you have to wonder how many people could have been hurt," Bollwage said.