New York's police department has disbanded an undercover spying operation against Muslims which rights groups said was baseless and unfairly targeted people solely because of their religion.
Civil liberty groups on Wednesday welcomed the disbandment of the "Demographics Unit" while the mayor of New York, Bill de Blasio, said the disbandment would allow police more opportunity to "go after the real bad guys".
The surveillance programme sent detectives into Muslim neighbourhoods to eavesdrop on conversations and watch day-to-day activities. Police also infiltrated mosques and student groups.
In the future, we will gather that information... through direct contact between the police precincts and the representatives of the communities they serve.
The programme was revealed in a series of articles by the Associated Press news agency, which reported that officers had infiltrated Muslim organisations following the attacks of September 11, 2001.
The disbandment comes after a federal judge, sitting in New Jersey, threw out a lawsuit last month brought by several New Jersey Muslims who claimed police illegally targeted them solely because of their religion.
The judge said the city persuasively argued that its surveillance was intended as an anti-terrorism, not an anti-Muslim, measure.
However, a New York Times report quoted Stephen Davis, the department's chief spokesman, as saying that the police department was changing its tactics.
"Understanding certain local demographics can be a useful factor when assessing the threat information that comes into New York City virtually on a daily basis," he said.
"In the future, we will gather that information, if necessary, through direct contact between the police precincts and the representatives of the communities they serve."
Police officials and the former New York mayor, Michael Bloomberg, who left office in January, had defended the programme as vital to anti-terrorism efforts.
Mayor De Blasio, who criticised the unit while running for office, said the disbandment was 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.''
Hina Shamsi, director of the American Civil Liberties Union, said the disbanded unit was only one part of "a huge, discriminatory surveillance programme".
"We look forward to an end to all aspects of the bias-based policing that has stigmatised New York's Muslim communities and done them such great harm," she said.
A lawsuit in New York, similar to that brought in New Jersey, is pending.