CHICAGO (AP) — Police investigators, prosecutors and mayors in cities nationwide are saying that the New York Police Department is putting officers at risk by conducting clandestine surveillance of Muslims in the city and across the Northeast. All cite their experience in serving communities that are home to large Muslim communities and other minority populations that have become isolated by events.

Others say the NYPD’s secret spying, and the vociferous defense against suggestions it might be a mistake, is a misguided approach that will hinder the department’s efforts to uncover potential attacks for years, if not decades.

That critique has been forcefully rejected by the NYPD and New York Mayor Michael Bloomberg, who has praised the department’s tactics as keeping the city safe in the decade since the Sept. 11, 2011, attacks. The department’s spokes-man recently said the NYPD retains “strong ongoing relations in the Muslim community” and pointed to successful anti-terror arrests he said have resulted from its intelligence operations.

For months, the surveillance of Muslims by the NYPD, detailed in a series of stories by The Associated Press, has been harshly criticized by some Muslim, civic and university leaders as an unconstitutional invasion of privacy.

But the most striking criticism came from the head of the FBI’s office in Newark, New Jersey, where the NYPD photographed mosques and eavesdropped on Muslim businesses in 2007. While taking care to say he did not want to “pile on,” Special Agent in Charge Michael Ward said the spying program had already started

to erode communication between the Joint Terrorism Task Force and Muslims in northern New Jersey and had created additional risks.

Ward’s boss, FBI Director Robert Mueller, has declined to comment on whether the NYPD’s surveillance activities were legal, proper or effective and he has praised New York Police Commissioner Ray Kelly for doing “a remarkable job of protecting New York.” However, Mueller did not interfere with or object to Ward’s remarkable public and pointed criticisms of the NYPD’s spying programs.

Likewise, while the Obama administration has refused to comment on the NYPD’s actions, it has made outreach to Muslims a cornerstone of its effort to fight terrorism and specifically cited the abilities of local police to connect with communities in ways that federal agents cannot.

Muslim activists in New York, upset with the NYPD’s actions, have intensified in recent days their efforts to discourage people from going directly to police with concerns. Former Phoenix Mayor Phil Gordon said that’s what happened in his city after Arizona passed legislation in 2010 that aggressively targets illegal immigrants and requires police to question whether people are living in the country legally while enforcing other laws.

Ron Haddad, the chief of police in Dearborn, Michigan, where close to 40 percent of the city’s nearly 100,000 residents are Arab- and Muslim-Americans, said there are limits to the value of surveillance. “The intelligence people tell you the only thing they can give you are indicators and the indicators are very limited and nothing is absolute,” Haddad said.

And so, police in Dearborn focus on building a relationship with the city’s Arab Americans and Muslim Americans. They have asked Islamic leaders for advice and continually train officers to recognize the customs of various ethnic groups, including Muslims, to avoid offending members of those communities.

Haddad said they have also taken care to openly and meticulously explain general police practices and, on occasion, even the specific details of ongoing investigations.

Such surveillance has the potential to erode a community’s trust in law enforcement that extends far beyond the police, said the top prosecutor in Chicago, Cook County State’s Attorney Anita Alvarez.

“We get lumped in with the police,” she said. “The distrust starts with police and goes right to us as well.”

The break can last for decades, Alvarez said. Chicago authorities are still trying to recover from the fracture with black residents that stems from the actions of police Lt. Jon Burge,

whose South Side unit tortured dozens of African Americans into confessing to crimes they did not commit in the 1970s and ’80s.

Despite widely publicized changes aimed at increasing the transparency of police interrogations, such as requiring police to videotape the interviews of murder suspects, some black Chicago residents still question whether confessions obtained by the city’s cops are legitimate.