Despite a prohibition on spying within the United States, the Central Intelligence Agency played a key role in transforming the New York Police Department's intelligence unit into a cutting edge spy shop dedicated to gathering information on Muslims, and not just in New York.

That's according to a new report out Wednesday by The Associated Press, which claims a veteran CIA agent helped train one of the NYPD's detectives in advanced surveillance methods. They also sent an undercover agent to work in the department, the report says.

With the CIA's help, the NYPD has gathered information on cab drivers, street level food vendors, ethnic book stores, Internet cafes and even mosques, sending snoops in to listen to sermons -- all without a hint of federal, state or local oversight.

Part of their strategy involves the use of a "Demographic Unit," which the NYPD officially denied exists. One undercover officer quoted by AP said he was ordered to move into an ethnic neighborhood and "act like a civilian" so his monitors could use him like a "walking camera."

Detectives have also tapped shopkeepers and "nosy neighbors" in ethnic neighborhoods to keep them updated on local goings-on, according to the report. They've even sent officers into prisons to promise help for Muslim prisoners, if they'll just work with the police.

Unlike the Federal Bureau of Investigation (FBI), which is prohibited from conducting similar operations without prior evidence of wrongdoing, the NYPD is unrestricted in this manner, although AP noted that the department has been keen to cover its tracks, to prevent any appearance of civil rights abuses or racial profiling.

The NYPD's intelligence unit isn't restricted to just New York either, and some agents have been deputized as federal marshals, conducting operations in other states. When they do so, however, they are not permitted to make arrests, AP added.

Officially the department said it only follows specific leads and does not profile ethnic areas.