The man believed to be responsible for the explosion in Manhattan on Saturday night and an earlier bombing in New Jersey, Ahmad Khan Rahami, was taken into custody on Monday after he was wounded by gunfire in an encounter with the police, according to law enforcement officials.
The dramatic episode on a rain-soaked street in Linden, N.J., came after the police issued a cellphone alert to millions of residents in the area telling them to be on the lookout for the suspect, who was described as “armed and dangerous.”
Photos from the scene showed a man believed to be Mr. Rahami laying on the sidewalk, hands cuffed behind his back and his shirt pulled up exposing his stomach and chest, with a police officer standing over him.
Witnesses said they saw police shoot at a man who was running away. One person who was too rattled to give his name said the victim appeared to have been shot more than once and was “still twitching.”
He also said it appeared a police officer was shot.
“Lotta’ lotta’ gunfire,” said Derek Pelligra, manager of Linden Auto Body.
Mr. Rahami, 28, was identified on surveillance video planting the bombs in Chelsea, both the device that exploded and another that did not detonate a few blocks away. He was described as a naturalized citizen of Afghan descent who had been living with his family in Elizabeth, N.J.
It remained unclear there were other suspects who the police were searching for in the connection with the bombing.
Gov. Andrew M. Cuomo, who said on Sunday that the attack did not appear to have a link to international terrorism, said new evidence might change that thinking.
“I would not be surprised if we did have a foreign connection to the act,” he said on CNN on Monday morning.
Mr. Rahami was born on Jan. 23, 1988, in Afghanistan. His last known address was in Elizabeth, N.J. He is described as about 5 feet 6 inches tall and about 200 pounds. Mr. Rahami has brown hair, brown eyes and brown facial hair.
A law enforcement official, who agreed to speak about the investigation only on the condition of anonymity, said they had conclusive evidence that Mr. Rahami was connected not just to the Manhattan explosion in the Chelsea neighborhood, but also to a bombing that took place earlier on Saturday on the Jersey Shore.
The city’s police commissioner, James P. O’Neill, directed the entire patrol force of the New York Police Department — 36,000 officers — to step up their vigilance and be on the alert for Mr. Rahami.
Dozens of officers and federal agents were zeroing in on locations in New Jersey. At the same time, more than 1,000 officers from the city police force’s Critical Response Command and Emergency Service Unit were working to secure New York City landmarks, commuter hubs and other sensitive sites.
By midmorning on Monday, the police had handled dozens of calls for suspicious packages.
Hours before Mr. Rahami’s name was released, the police discovered five pipe bombs near a train station in Elizabeth, detonating one of them overnight as they sought to disarm them.
Federal Bureau of Investigation agents with dogs and Elizabeth police officers swarmed a residential neighborhood of low-rise apartment buildings, multiple family homes and small businesses.
Law enforcement officers closed and evacuated La Bottega Dei Sapori deli and Sonia’s Beauty, a salon to the left of the restaurant, as well as HR Computer and Communication Services Inc.
The law enforcement official said that while there was no direct evidence yet linking Mr. Rahami to the Islamic State or Al Qaeda, much about him remained unknown.
“We don’t know his particular ideology or what his inspiration was or whether he was directed or whether he was inspired,” the official said. “We don’t have any of that.”
“We have a lot to connect him to the Seaside Heights device, to the 27th Street device, to the 23rd Street device,” the official added. “And in all likelihood the Elizabeth train station device — which is a half-mile from his residence. So, the ideology, the connection to international terrorism, we might flesh that out as we go through the results of search warrants, looking for computers, discs, things like this. Search warrants that we did Sunday night at the residence in Elizabeth.”
“Here’s a guy who has been involved” in a series of bomb-related episodes in close succession in crowded areas, the official said. “So we need to get him.”
Late on Sunday night, the police stopped a car on the Belt Parkway near the Verrazano-Narrows Bridge in Brooklyn and took in five people who were connected to Mr. Rahami for questioning.
Police chased down leads on both sides of the Hudson overnight, including the tip that led to the discovery of the pipe bombs in Elizabeth.
Two men had walked out of Hector’s Place Restaurant near the city’s train station and found a backpack containing five explosives resting atop a municipal garbage can, Mayor J. Christian Bollwage said.
After finding that the backpack contained “wires and a pipe,” the mayor said, the men dropped the item in the street and contacted the Elizabeth Police Department around 8:45 p.m. The police, in turn, called the Union County bomb squad, and the investigation was quickly turned over to the F.B.I. and the New Jersey State Police, Mr. Bollwage said.
The F.B.I. then sent in a pair of robots and determined that the backpack held five bombs, some of which were pipe bombs, the mayor said.
Around 12:30 a.m., the robots tried to clip a wire to disarm one bomb and accidentally detonated it, the mayor said. No injuries were reported.
Mr. Bollwage, speaking at a news conference on Monday morning, described how the Rahami family had issues with the city in the past, mainly surrounding the operation of their family restaurant, First American Fried Chicken.
Mr. Rahami’s father, Muhammad, opened the restaurant about a decade ago and employed his sons, the mayor said.
It was open 24 hours a day, but neighbors complained about rowdy crowds that would gather at the place, often after midnight.
Dean McDermott, who lives near the restaurant in Elizabeth, said he found patrons loitering in his yard and urinating in his driveway.
Responding to the complaints, the City Council passed an ordinance that would force the restaurant to close late at night, the mayor said.
“The City Council voted to shut it down at 10 p.m.,” he said. “They kept getting complaints from neighbors, it was a distress to people in the neighborhood.”
The Rahamis did not comply, according to neighbors.
On one occasion when the police came to force the restaurant to close, one of Mr. Rahami’s older brothers got in a fight with a police officer and was arrested. Before the case could be resolved, Mr. McDermott said, the son fled to his home country, Afghanistan.
The mayor confirmed that the Rahami family sued the mayor, the City Council, some 20 police officers, claiming that he had been discriminated against because of his race and ethnicity.
The F.B.I. released a photograph of Mr. Rahami.
“It was neighbor complaints, it had nothing to do with his ethnicity or religion,” the mayor said. “It had to do with noise and people congregating on the streets.”
A frequent patron of the restaurant, Ryan McCann, 33, said Ahmad Rahami was friendly and did not seem outwardly angry. Rather, Mr. McCann said, he was obsessed with fast cars, specifically Honda civics custom built to race.
Mr. Rahami wore Western clothing, hung out on the sidewalk with friends and often slipped his regular customers free food, he said.
“He’s a very friendly guy; he gave me free chicken,” Mr. McCann said. “He was always the most friendly man you ever met.”
Mr. McCann said that the family lived in an apartment above the restaurant and that Mr. Rahami had been taking over more responsibility at the restaurant.
“Lately, it was just the son, I haven’t seen the father in a while,” he said.
To other customers, however, the Rahami family seemed reserved.
“They seemed secretive, a little mysterious,” said Jessica Casanova, 23, a neighbor. “They’re too serious all the time.”
Another neighbor, Joshua Sanchez, 24, was also struck by the familial insularity inside the chicken restaurant he referred to as “the shack.”
“The dad and him would always be together at the shack, just them two, family business,” he said. “They never hired people, it was just the father and the son all the time.”