Image copyright AP Image caption New York City Police Commissioner William Bratton (left) is said to have met with critics of the controversial surveillance programme prior to its termination

The New York Police Department has disbanded a secret programme designed to eavesdrop on Muslims to identify potential terrorism threats.

The Demographics Unit had dispatched plainclothes detectives to listen to conversations and build files on places frequented by Muslims, US media say.

The squad had been the subject of two federal lawsuits in the past, and drew ire from civil rights groups.

It is also said to have sowed Muslim mistrust for law enforcement.

"This reform is a critical step forward in easing tensions between the police and the communities they serve, so that our cops and our citizens can help one another go after the real bad guys," the office of New York City Mayor Bill de Blasio wrote in a statement.

'Psychological warfare'

The decision to stop the programme was reportedly made by new Police Commissioner William Bratton, and is viewed as a moving away from past intelligence gathering practices instituted after the 9/11 attacks.

The unit - in operation since 2003 and later renamed the Zone Assessment Unit - logged where Muslims worked, shopped, ate and prayed.

"The Demographics Unit created psychological warfare in our community," Linda Sarsour of the Arab American Association of New York told the New York Times newspaper.

"Those documents, they showed where we live," she added. "They were able to see their entire lives on those maps. And it completely messed with the psyche of the community."

Ms Sarsour along with several advocates reportedly met Mr Bratton and other police officials last week to discuss the shutting down of the covert unit.

The squad's detectives have since been reassigned, a police department spokesman said.

The head of the New York Civil Liberties Union, Donna Lieberman, told the Associated Press the surveillance had harmed community relations.

"We hope this means an end to the dragnet approach to policing... and a commitment to going after criminal suspicion, rather than innocent New Yorkers,'' she told AP.