|Ahmad Khan Rahami|
Saturday's attacks, which wounded 29 people in Manhattan and cancelled a US Marine Corps race in New Jersey, came on the same day that a Somali-American with possible links to the Islamic State extremist group went on a stabbing rampage in Minnesota, wounding nine people.
President Barack Obama, in New York at the UN General Assembly with world leaders, called on Americans "not to succumb to fear" as presidential candidates Hillary Clinton and Donald Trump sparred over how best to combat terror attacks.
Obama stressed that investigators saw no connection between the East Coast bombings and the Minnesota stabbings, where police said the assailant made "some references to Allah" in carrying out the attack.
Ahmad Khan Rahami, 28, was initially spotted by a police officer outside a bar in Linden, New Jersey around three hours after the FBI released his mugshot and described him as "armed and dangerous."
When the officer approached the suspect, he immediately whipped out a handgun and shot the officer in the torso, hitting his protective vest, said acting Union County prosecutor Grace Park.
In a subsequent police shootout, Rahami was shot multiple times outside an auto repair shop, several blocks west of the bar, she said.
The handgun was recovered at the scene and Rahami was taken to hospital where he underwent surgery, officials said.
Neither the first officer nor a second hit in the head by a fragment of bullet suffered life-threatening injuries, the prosecutor said.
Rahami was stretchered into an ambulance in the town of Linden, wearing a bloodied bandage on his right arm and moving his head moments after being taken into custody.
- $5.2 million bail, wife in Pakistan -
He was charged with five counts of attempted murder of a law enforcement officer and on two unlawful weapon possession counts, Park announced.
A judge set bail at $5.2 million.
Little is known about a suspect, who was not on the authorities' radar before the attacks. Born in Afghanistan, he worked at his family's fried chicken restaurant in Elizabeth, New Jersey, and is a US citizen.
Investigators will now focus on whether he had co-conspirators and on his motive in allegedly bombing New York's Chelsea neighborhood and detonating a pipe bomb along the route of a US Marine Corps race.
Another pressure cooker device was found and defused close to the scene of the Manhattan blast, and five pipe bombs were discovered late Sunday in a trash can in Elizabeth. These were also defused.
Rahami had traveled "extensively," New York Governor Andrew Cuomo told CNN, visiting his homeland and Pakistan, where he had a wife.
"But we don't have any associations at this time with ISIS, Taliban, etc that would explain this behavior," the governor added.
Fifteen years after the September 11, 2001 attacks, officials say lone-wolf attacks perpetrated by individuals who may be inspired by IS or Al-Qaeda propaganda are the greatest terror threat to the homeland.
"I have no indication there is a cell operating in the area," senior FBI official Bill Sweeney told a news conference in New York.
New York mayor Bill de Blasio said authorities were not currently looking for any other suspects in connection with an "act of terror."
- Clinton, Trump at loggerheads -
Rahami was apparently seen in surveillance footage taken in Chelsea before the bomb went off. Separate footage broadcast by CBS purported to show Rahami dragging a large bag down a street in the district.
Rahami's family sued Elizabeth in 2011, accusing the city and local police department of religious and ethnic discrimination in forcing them to close their chicken restaurant by 10:00 pm.
The suit was settled in 2012 in the city's favor, Elizabeth Mayor Chris Bollwage told reporters.
"What happened is not in any fashion a representation of the Muslim community or the Muslim faith. He is a sick, deranged young man," said Salaam Ismial, a social worker at a local mosque.
Although there has been no claim of responsibility for the New York or New Jersey bombs, a jihadist-linked news agency, Amaq, claimed that an IS "soldier" carried out the Minnesota stabbings.
The suspect, identified by police as 20-year-old Dahir Ahmed Adan, injured nine people in a shopping mall in St Cloud before being shot dead by an off-duty police officer.
The Somali American had been a high-achieving student with no known history of violence.
On the election trail, the attacks fanned acrimony in an already deeply divisive campaign, with Democrat Clinton touting experience and patient determination and Republican Trump demanding radical change.
Clinton, whose lead in the polls has dipped less than 50 days before the election, said the United States needed to invest "more time and more resources" in confronting the lone-wolf threat.
"I will bring an end to these senseless acts of violence," Trump said. "We will not allow political correctness and soft-on-terror, soft-on-crime policies to threaten our security and our lives."