CHELSEA, Manhattan (WABC) --Three law enforcement officials said the clues that led them to Ahmad Khan Rahami included a fingerprint lifted from one of the New York sites and "clear as day" surveillance video from the bombing scene that helped identify Rahami.
The officials spoke to the Associated Press on condition of anonymity because they were not authorized to discuss the case.
Five people were pulled over Sunday night in a vehicle associated with Rahami but were questioned and released, William Sweeney Jr., the FBI's assistant director in New York, said, declining to say whether they might face any charges.
Law enforcement officials said at least one of Rahami's relatives was in the car, which appeared headed toward Kennedy Airport in New York after coming from New Jersey.
Linden Mayor Derek Armstead said the break in the case came late Monday morning, when the owner of a bar reported someone asleep in his doorway. A police officer went to investigate and recognized the man as Rahami, police and the mayor said.
Rahami pulled a gun and shot the officer - who was wearing a bulletproof vest - in the torso, and more officers joined in a gun battle that spilled into the street, bringing Rahami down, police Capt. James Sarnicki said.
Peter Bilinskas was standing by his desk at his Linden bowling-supply shop when he heard what sounded like gunfire and saw a man walking down the street with a gun in his hand.
As a police car pulled up at the traffic light in front of the shop, the man fired about six shots at the cruiser, then continued down the street with police following him, Bilinskas said.
Around the time Rahami was captured, President Barack Obama was in New York on a previously scheduled visit for a meeting of the U.N. General Assembly. He called on Americans to show the world "we will never give in to fear."
Rahami lived with his family on a busy street a few miles from the Newark airport. An AP reporter went to the building that houses the family's restaurant and home, but it was cordoned off.
U.S. Attorney Preet Bharara, chief federal prosecutor in New York, said New Jersey officials will probably bring charges against Rahami in the police officers' shooting while federal authorities weigh charges of their own.
Rahami is a suspect in the Seaside Park, New Jersey and Chelsea bombings as well as 2 separate incidents in which bombs were found blocks away from the blast site in Chelsea and at a train station in Elizabeth, New Jersey.
Rahami was charged with five counts of attempted murder of a law enforcement officer in connection with what happened in Linden. He was also charged with second-degree unlawful possession of a weapon and second-degree possession of a weapon for an unlawful purpose.
(The Associated Press contributed to this report.)