To neighbors and customers of his family’s storefront chicken takeout, Ahmad Khan Rahami was a friendly, quiet presence behind the counter who liked talking about cars and was generous with free food.

So when the 28-year-old Afghan immigrant was apprehended Monday as the lead person of interest in bombings in New York and New Jersey, those who knew him expressed shock, questioning whether his turn to religiosity in recent years might have hinted at views otherwise kept hidden.

Rahami’s father and brothers had long nursed tensions with neighbors and officials in Elizabeth, New Jersey, over the restaurant’s late hours, a conflict the family claimed in a lawsuit was the result of discrimination against them as Muslims.

But Ahmad Rahami’s demeanor — increasingly devout but more likely to talk about worldly pursuits than his faith — never hinted at anything but goodwill, customers said.

“He’d always talk about his cars. He loved his Civics, he loved going fast,” said Ryan McCann, a frequent customer at First American Fried Chicken, the restaurant that Rahami’s father, Mohammed Rahami, has run since 2002. “He was so friendly he’d give us free chicken here and there, just because we shopped there so much.”

Ahmad Rahami, a naturalized U.S. citizen, was taken into custody after a shootout with police in Linden, a nearby town.

A law enforcement official says fingerprints and surveillance video helped investigators identify him as the man suspected of setting off bombs in the New York area over the weekend. The official says he’s seen in surveillance footage “clear as day” at the scene of the Saturday night bombing in Manhattan.

The official says investigators recovered his fingerprints from the scene.

Rahami wasn’t on any terror or no-fly watch lists, a law enforcement official said, but he’d been interviewed by officials for immigration purposes.

Another law enforcement official says investigators pulled over a car carrying three men and two women “associated” with Rahami when it appeared headed toward an airport Sunday.

The officials spoke to The Associated Press on the condition of anonymity because they weren’t authorized to speak publicly about the case.

As FBI agents removed bags of evidence from the restaurant Monday, officials and residents recalled Rahami and his family, who shared an apartment over the business.

Flee Jones, 27, who said he’d known Rahami since they were teenagers, told reporters he’d noticed a change in Rahami’s personality after a trip to Afghanistan several years ago. When Rahami returned, he “got more religious” and dressed differently than before, Jones said.

“He was more quiet and more mature,” Jones said. “I said, ‘Oh, where have you been?’ And he said, ‘Oh, vacation.’ But I knew he went to Afghanistan because his little brother said it.”

A photo of Rahami, published in the Edison High School yearbook when he graduated in 2007, shows him with a carefully groomed goatee, wearing a crimson vest and tie. Rahami went on to attend Middlesex County College from 2010 to 2012, majoring in criminal justice, but didn’t graduate.

Andre Almeida, a customer at the restaurant for the past eight years, said he noticed when Rahami stopped wearing Western clothes after returning from Afghanistan and started wearing “a little more ethnic clothing.”

Rahami was accused of stabbing a relative in 2014, but a grand jury declined to proceed with criminal charges, court records show. He also was accused of violating a domestic-violence restraining order in 2012.

A Democratic New Jersey congressman, Albio Sires, said Rahami contacted his office from Pakistan in 2014 seeking help because his wife had an expired Pakistani passport.

Sires said his office wrote a letter to the U.S. embassy in Pakistan to check on the status of the case and the woman received a visa. He said he didn’t know if she ever came to the country, and the FBI didn’t answer when asked about it Monday.

Neighbors had complained to Elizabeth officials that the Rahamis’ restaurant was a late-night nuisance, Democratic Elizabeth Mayor Christian Bollwage said.

Rahami’s father and two brothers sued the city in 2011 after Elizabeth police said the restaurant stayed open past 10 p.m. in violation of a local ordinance. The Rahamis charged in the lawsuit they were targeted by police because they’re Muslims.

The harassment, the lawsuit alleged, was based largely on the complaints to officials by one neighbor who regularly walked into the restaurant to tell them that “Muslims don’t belong here” and “Muslims are trouble.”

Adjudication of the lawsuit was put on hold in 2011 when the elder Rahami traveled to Pakistan and was unable to return to the U.S. in time, court filings show. The lawsuit was terminated in 2012 because one of the brothers, Mohammad K. Rahami, had pleaded guilty to blocking police from enforcing restrictions on the restaurant.

But neighbors aware of tensions over the restaurant said Ahmad Rahami was easy to get along with, if somewhat reserved.

“He was just very quiet,” said Jorge Vasquez, who owns a business a block over and frequently visited the restaurant.

As police searched for Ahmad Rahami on Monday, the owner of a bar in Linden found a man sleeping in his hallway. The man was initially presumed to be a vagrant, but police officers who responded quickly realized it was Rahami, Democratic Linden Mayor Derek Armstead said.

Armstead said the man pulled out a handgun and fired at the officers, hitting one in a bulletproof vest. He said the man then began firing as he ran down the street and police shot him in the leg.

Rahami was charged with attempted murder of a law enforcement officer, unlawful possession of a weapon and possession of a weapon for an unlawful purpose, prosecutors said. Bail was set at $5.2 million.

Associated Press writers Michael Catalini, Deepti Hajela and Dake Kang in Elizabeth, New Jersey, Josh Cornfield in Trenton, New Jersey, Eric Tucker in Washington, D.C., Jake Pearson and Michael Balsamo in New York and Lisa Marie Pane in Atlanta contributed to this story.

This story has been corrected to show that Jones said Rahami’s trip to Afghanistan occurred several years ago, not in 2014.