Media playback is unsupported on your device Media caption Footage from WABC shows the suspect being loaded into an ambulance

A man suspected of planting bombs in New York and New Jersey is in custody after a shootout with police that began when he was found asleep in a doorway.

Afghan-born Ahmad Khan Rahami, 28, is undergoing surgery for a gunshot wound after the confrontation in New Jersey.

Republican Donald Trump immediately seized on the news as vindication of his hard line on immigration and vowed to defeat "radical Islamic terrorism".

The FBI said no other suspect was being sought over the weekend's blasts.

A huge manhunt was sparked on Monday after police publicly identified Mr Rahami as chief suspect.

Officers have refused to discuss what led them to him but senior law enforcement officials have told US media that a fingerprint collected from an unexploded device in New Jersey was key.

Linden Mayor Derek Armstead said the suspect was found sleeping in the doorway of Merdie's Tavern in Linden, New Jersey.

When a police officer went to investigate and wake him, the suspect fired on him and two police officers suffered injuries, before his arrest.

He was later charged with five counts of attempted murder of police officers over the shootout, prosecutors said.

Federal prosecutors are still determining charges over the New York-area bombings, the AP reported.

Media playback is unsupported on your device Media caption A bomb disposal robot tried to disarm a device in Elizabeth

At a rally in Florida later on Monday, Mr Trump said Mr Rahami would be indulged by US authorities and this was evidence the country had become weak.

"Now we will give him amazing hospitalisation. He will be taken care of by some of the best doctors in the world."

He repeated calls for "extreme vetting" that would include an assessment of whether potential immigrants share American values.

Mr Trump also addressed revelations that the Department of Homeland Security mistakenly granted US citizenship to at least 858 immigrants who came from "special interest countries", which present a security concern or have high rates of immigration fraud.

He warned that Democratic rival Hillary Clinton's "open border" policy would only lead to more incidents such as the attacks in Minnesota and New York.

A week before the first debate between the two candidates, Mrs Clinton accused him of enabling terrorists and instead pledged to build trust between law enforcement and Muslim-American communities.

Reaction on Monday

Will NYC blasts affect race for White House?

What we know so far

Profile of Ahmad Khan Rahami

The FBI said they have evidence linking Mr Rahami to devices in both New Jersey and New York, but there was no indication a terror cell was active in the area.

What we know:

Ahmad Kham Rahami has been arrested in connection with the New York and New Jersey blasts

He is a naturalised US citizen born in Afghanistan

What we do not know:

Motivation for the attacks or whether he was radicalised

Whether there is a link to the so-called Islamic State

How exactly authorities pinpointed Mr Rahami as the suspect behind the bombings

Image copyright AFP Image caption The suspect was taken into custody on Elizabeth Avenue in Linden, according to reports

The bombing in the Chelsea district on Saturday night injured 29 people. An unexploded device was found nearby.

Other devices have been found or have exploded in New Jersey over the past few days.

Early on Saturday, a pipe bomb exploded in a shore town ahead of a charity race. No-one was hurt.

One of several devices found in an abandoned backpack near the railway station in Elizabeth exploded as a police robot was trying to disarm it in the early hours of Monday morning.

Local residents in Elizabeth, who had encountered Mr Rahami in his work at the family's fried chicken bar, said the family were ordinary and "Americanised".

"He's a very friendly guy, that's what's so scary," said Ryan McCann.

President Barack Obama, speaking in New York, said officials did not believe there was a connection between events in New York and New Jersey and a stabbing attack in Minnesota, also on Saturday, in which nine people were injured.

That attack was apparently carried out by a 22-year-old ethnic Somali.

The president said that the US would continue to go after so-called Islamic State (IS).

"We will continue to lead the global coalition and the fight to destroy Isil [IS] which is instigating a lot of people over the internet to carry out attacks," he said.