NEW YORK — Five potential bombs were discovered overnight near a New Jersey station, one of which blew up on Monday as a bomb squad robot tried to disable it, after a weekend of attacks and security alerts in the United States.

The devices were found late on Sunday, a day after a pressure-cooker bomb packed with shrapnel exploded in New York City’s Chelsea district, wounding 29 people, and a pipe bomb went off along the route of a New Jersey charity run without hurting anyone. Also on Saturday, a man armed with a knife wounded nine people at a Minnesota shopping mall.

Investigators were probing possible links between the attacks, which came as world leaders begin converging on New York for the annual meeting of the United Nations General Assembly on Tuesday.

While officials described the weekend bombs and the Minnesota attack as deliberate, criminal acts and said they were investigating them as potential acts of terrorism, they stopped short of characterizing the motivation behind any of them until more evidence is uncovered.

In the latest incident, five potential explosive devices were found in a backpack left in a trash can near a train station and a bar in Elizabeth, New Jersey, Mayor Christian Bollwage told reporters.

After cordoning off the area, a bomb squad used a robot to cut a wire to try to disable the device, but inadvertently set off an explosion, he said.

No one was hurt, but Bollwage said: “I can imagine that if all five of them went off at the same time, that the loss of life could have been enormous if there was an event going on.”

The incident took place less than 15 miles southwest of Manhattan.

Two men discovered the backpack and reported it to police after they saw “wires and a pipe” in the package, Bollwage said.

No suspects were immediately identified in the New York and New Jersey attacks or the latest incident in Elizabeth.

Secondary device

A similar, unexploded device to the one that went off in Chelsea on Saturday was found a few blocks away later that night. CNN reported that police had reviewed surveillance video showing a man leaving both devices earlier that day.

No international militant group has said it was behind the the New York blast. But New York Governor Andrew Cuomo said the act of blowing up a bomb in a crowded area of Manhattan “is obviously an act of terrorism.”

A pair of Massachusetts brothers used pressure-cooker bombs to kill three people and wound more than 260 in the 2013 Boston Marathon bombing.

The Islamic State militant group quickly claimed responsibility for the Minnesota attack by a man who police said made references to Allah and asked at least one person if he or she was Muslim before assaulting the individual. An off-duty police officer fatally shot the assailant.

Police did not immediately identify the Minnesota attacker, citing an ongoing investigation.

No immediate connections were established between the Minnesota attack and the bombings in New York and New Jersey.

Some 135 heads of state or government are expected to attend this week’s event at the United Nations, and city officials said they had bolstered an already heavy security force with 1,000 more uniformed police officers and National Guard members.

‘Crude’ devices

Federal Bureau of Investigation experts have examined remnants of the Chelsea device, the second one found nearby, and and the pipe bomb that blew up at the charity race in Seaside Park, New Jersey, some 80 miles south of New York City.

“The crudity of the devices in all three cases certainly doesn’t point to any group that’s been developing (improvised explosive devices) for years,” said a U.S. official involved in the investigation who requested anonymity to discuss the inquiry.

The official added that the apparent low level of planning had some investigators concerned the blasts were just a test of New York’s security.

“That’s what worries us: Was this some kind of test run, not just of the devices, but also of the surveillance in New York and the response?” the official said.

The United States has experienced a series of deadly attacks over the past year by gunmen inspired by Islamic State, which has been fighting a long civil war in Syria. A man who claimed allegiance to the group fatally shot 49 people at an Orlando, Florida, nightclub in June, just over six months after a married couple massacred 14 in San Bernardino, California.

The FBI considers the Minnesota episode a “potential act of terrorism,” Richard Thornton, FBI special agent in charge of the agency’s Minneapolis division, told a news conference on Sunday.

Amaq, the news agency affiliated with Islamic State, issued a statement on Sunday calling the attacker “a soldier of the Islamic State.” It was not immediately possible to verify that assertion.