Media playback is unsupported on your device Media caption A bomb disposal robot tried to disarm a device under a bridge near the station

A suspicious device found near a New Jersey railway station exploded as a bomb squad was attempting to disarm it with a robot, officials say.

It was one of up to five devices found in a backpack inside a rubbish bin near the station in Elizabeth, according to the city's mayor. No-one was hurt.

The discovery came after three attacks at the weekend - bombs in New York and New Jersey, and stabbings in Minnesota.

The explosion in New York's Chelsea area injured 29 people.

In Elizabeth, New Jersey, police detonated a device on Monday following concerns it was a live bomb.

"That was not a controlled explosion," said Mayor Christian Bollwage, adding that the blast happened as a robot examining a device cut a wire.

FBI Newark said a suspicious package contained "multiple improvised explosive devices".

It was picked out of a bin by two men who thought the bag could contain something of value.

"They started to examine the backpack when they found the wires and the pipes and they dropped the backpack, walked around the corner, went into police headquarters and notified us right away," said Mr Bollwage.

In New York City, the FBI said it had stopped a "vehicle of interest" in Brooklyn on Sunday but made no arrests.

Media playback is unsupported on your device Media caption The moment of the New York blast was caught on CCTV

Five people were taken into custody for questioning, officials told US media. But a spokeswoman said no-one had been charged and the investigation was continuing.

A man seen on surveillance video has been described as a "person of interest" in the police inquiries, according to US media.

Both the bomb that detonated on Saturday in Chelsea, and a device found nearby, were shrapnel-filled pressure cookers - similar to the bombs used in the attack on the 2013 Boston marathon, US media report.

They also used flip phones and Christmas lights designed to trigger the explosive, the New York Times said.

The two instruments appeared to be "similar in design", New York Governor Andrew Cuomo said.

Several attacks in the US over the weekend caused security alerts:

A pipe bomb exploded on the route of a charity race in New Jersey on Saturday, forcing the event to be cancelled but causing no injuries

Also on Saturday, at least eight people were wounded in a stabbing attack at a shopping mall in the US state of Minnesota

At least 29 people were injured in an "intentional" explosion in the Chelsea area of Manhattan at around 21:00 (01:00 GMT on Sunday)

Another device was later found four blocks from the site of the blast and later destroyed in a controlled explosion

A backpack containing suspicious devices was found in Elizabeth, New Jersey, late on Sunday

One device found in Elizabeth exploded early on Monday as a bomb disposal robot tried to deactivate it

'People running for their lives'

Some 1,000 extra security personnel are being deployed to New York's transport hubs.

Authorities have described the weekend bombings in New York and New Jersey, along with a stabbing attack in Minnesota, as acts of terrorism and are trying to establish whether there are any links between them.

But they say they were so crude that it is unlikely an international group was behind them.

So-called Islamic State (IS) has said the suspected attacker in Minnesota was one of its "soldiers". It is not clear whether IS was involved in planning the assault.