Cohen wanted a source inside every mosque within a 250-mile radius of New York, current and former officials said. Though the officials said they never managed to reach that goal, documents show the NYPD successfully placed informants or undercovers — sometimes both — into mosques from Westchester County, N.Y., to New Jersey.

The NYPD used these sources to get a sense of the sentiment of worshippers whenever an event generated headlines. The goal, former officials said, was to alert police to potential problems before they bubbled up.