According to documents and interviews conducted by the AP, the NYPD targeted Moroccans in an effort to gather information about Muslim communities, and intended to expand the program to other ethnic groups. The program was called "the Moroccan Initiative."
From the AP:
Undercover officers snapped photographs of restaurants frequented by Moroccans, including one that was noted for serving "religious Muslims." Police documented where Moroccans bought groceries, which hotels they visited and where they prayed. While visiting an apartment used by new Moroccan immigrants, an officer noted in his reports that he saw two Qurans and a calendar from a nearby mosque.
"A lot of these locations were innocent," an anonymous official told the AP. "They just happened to be in the community."
The Moroccan Initiative was reportedly a project of an NYPD intelligence division that conducted secret operations in the New York-area involving undercover officers called "rakers" and undercover informants called "mosque crawlers," who would often go into ethnic communities outside of their jurisdiction An earlier AP investigation uncovered the operations, and resulted in an investigation by the CIA.
Read the full report here.