A lengthy and revealing article on the NYPD Intelligence Division:

With CIA help, NYPD moves covertly in hunt for terrorists, by Associated Press. New York Post, August 24, 2011.
Since the terrorist attacks of Sept. 11, 2001, the NYPD has become one of the country's most aggressive domestic intelligence agencies. A months-long investigation by The Associated Press has revealed that the NYPD operates far outside its borders and targets ethnic communities in ways that would run afoul of civil liberties rules if practiced by the federal government. And it does so with unprecedented help from the CIA in a partnership that has blurred the bright line between foreign and domestic spying.

Neither the city council, which finances the department, nor the federal government, which contributes hundreds of millions of dollars each year, is told exactly what's going on.

The department has dispatched teams of undercover officers, known as "rakers," into minority neighborhoods as part of a human mapping program, according to officials directly involved in the program. They've monitored daily life in bookstores, bars, cafes and nightclubs. Police have also used informants, known as "mosque crawlers," to monitor sermons, even when there's no evidence of wrongdoing. NYPD officials have scrutinized imams and gathered intelligence on cab drivers and food cart vendors, jobs often done by Muslims.

Many of these operations were built with help from the CIA, which is prohibited from spying on Americans but was instrumental in transforming the NYPD's intelligence unit.

A veteran CIA officer, while still on the agency's payroll, was the architect of the NYPD's intelligence programs. The CIA trained a police detective at the Farm, the agency's spy school in Virginia, then returned him to New York, where he put his new espionage skills to work inside the United States.

And just last month, the CIA sent a senior officer to work as a clandestine operative inside police headquarters.

While the expansion of the NYPD's intelligence unit has been well known, many details about its clandestine operations, including the depth of its CIA ties, have not previously been reported.