LINDEN, N.J. (AP) — 28-year-old Ahmad Khan Rahami was taken into custody after a shootout with police officers in New Jersey.

The Afghan immigrant was wanted by authorities for questioning in the bombings that rocked a New York City neighborhood and a New Jersey shore town.

Rahami was wounded in a gun battle with police that erupted when he was discovered sleeping in the doorway of a bar, authorities said.

Rahami is a naturalized U.S. citizen from Afghanistan. He lived with family in an apartment in Elizabeth, New Jersey, over a fried-chicken restaurant owned by his father.

Residents of the town who frequented the restaurant were shocked when they heard the news. One man said went into the store on a weekly basis and described Rahami as a very friendly man.