Police have arrested an Afghanistan-born American suspected of detonating a bomb in the heart of New York City and planting other devices.
The 28-year-old was captured in a dramatic gun battle that wounded him and two officers.
Officials did not offer any information on the possible motives of Ahmad Khan Rahami.
New York's mayor said the bombing that injured 29 people in the bustling Chelsea district was "an act of terror."
Police in Linden, New Jersey, swooped in on Rahami just hours after authorities publicly identified him as the prime suspect in the Saturday night blast and sent out an alert to millions of mobile phone users.
Authorities suspect Rahami, who lived in the neighbouring town of Elizabeth, was also behind a bomb that exploded on the New Jersey shore on Saturday, a device found near the New York blast, and up to six more devices found near the Elizabeth train station on Sunday night.
The bombings and subsequent manhunt prompted even greater security in America's biggest city, already on high alert for the gathering of world leaders, including Prime Minister Malcolm Turnbull, at the United Nations in New York for the annual General Assembly.
Police had responded to a complaint by a bar owner of a man sleeping in the closed establishment's entrance.
"The officer realised that this might be the person that the FBI was looking for. The officer then said, 'show me your hands,' and the person went to the side of his body and pulled out a handgun and fired a round at the officer, striking him in the abdomen. Fortunately the officer had his bulletproof vest on," Linden Police Captain James Sarnicki told reporters.
Rahami opened fire on police, officials said, injuring another officer with broken glass that struck his forehead.
Police fired back, wounding Rahami in the arm and leg. Eyewitness video showed Rahami handcuffed in a gurney, his wounds bandaged, before he was taken to hospital for surgery. His condition is not considered life threatening.
The Union County Prosecutor's Office has charged Rahami with five counts of attempted murder in the first degree and two second-degree weapons charges in relation to the shootings, spokesman Mark Spivey said.
More charges are likely in federal court.
Rahami had not previously been identified as dangerous but his family was known to police as a result of late-night noise and crowd complaints at a family halal chicken restaurant in Elizabeth.
Investigators said they had not yet determined a motive for the bombings and there was no indication that an extremist cell was operating in the area, William Sweeney of the Federal Bureau of Investigation's New York division told a news conference.