To neighbours and customers of his family's fried chicken takeaway, Ahmad Khan Rahami was a friendly, quiet presence behind the counter who liked talking about cars and was generous with free food.

Rahami's father and brothers had long nursed tensions with neighbours 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 demeanour - 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 has run since 2002.

"He was so friendly he'd give us free chicken here and there, just because we shopped there so much."

Rahami, a naturalised US citizen, was taken into custody after a shoot-out with police in Linden, a nearby town.

A law enforcement official said fingerprints and surveillance video helped investigators identify him as the man suspected of setting off bombs in the New York area over the weekend.

Rahami was not on any terror or no-fly watch lists, but had been interviewed for immigration purposes.

Another law enforcement official said investigators pulled over a car carrying three men and two women "associated" with Rahami when it appeared to be heading towards an airport on Sunday.

As FBI agents removed bags of evidence from the restaurant on Monday, people recalled Rahami and his family, who shared an apartment above the business.

Flee Jones, 27, who has known Rahami since they were teenagers, said he 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, Mr Jones said.

"He was more quiet and more mature," he 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 did not graduate.

Andre Almeida, a customer at the restaurant for the past eight years, said he noticed 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 did not proceed with criminal charges, court records show. He also was accused of breaching 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.

Mr Sires said his office wrote a letter to the US embassy in Pakistan to check on the status of the case and the woman eventually received a visa. He said he did not know if she ever came to the country, and the FBI did not answer when asked on Monday.

Neighbours had complained to Elizabeth officials that the Rahamis' restaurant was a late-night nuisance, Elizabeth's mayor Christian Bollwage said.

Rahami's father and two brothers sued the city in 2011 after Elizabeth police said the restaurant stayed open past 10pm in violation of a local law. The Rahamis claimed in the lawsuit they were targeted by police because they were Muslims.

The harassment, the lawsuit claimed, was based largely on the complaints to officials by one neighbour 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 travelled to Pakistan and was unable to return to the US in time, court filings show. The lawsuit was terminated in 2012 after one of the brothers, Mohammed K Rahami, pleaded guilty to blocking police from enforcing restrictions on the restaurant.

Nevertheless, neighbours said Ahmad Rahami was easy to get along with, if somewhat reserved.

"He was just very quiet," said Jorge Vasquez, who owns a nearby business and frequently visited the restaurant.