NEW YORK — The New York Police Department targeted Muslim mosques with tactics normally reserved for criminal organizations, according to newly obtained police documents that showed police collecting the license plates of worshippers, monitoring them on surveillance cameras and cataloging sermons through a network of informants.

The documents, obtained by the Associated Press, have come to light as the NYPD fends off criticism of its monitoring of Muslim student groups and its cataloging of mosques and Muslim businesses in nearby Newark, N.J.

The NYPD’s spokesman, Paul Browne, forcefully defended the legality of those efforts Thursday, telling reporters that its officers may go wherever the public goes and collect intelligence, even outside city limits.

The new documents, prepared for Police Commissioner Raymond Kelly, show how the NYPD’s roster of paid informants monitored conversations and sermons inside mosques. The records offer the first glimpse of what those informants, known informally as “mosque crawlers,” gleaned from inside the houses of worship.

For instance, when a Danish newspaper published inflammatory cartoons of Prophet Muhammad in September 2005, Muslim communities around the world erupted in outrage. Violent mobs took to the streets in the Middle East. A Somali man even broke into the cartoonist’s house in Denmark with an ax.

In New York, thousands of miles away, it was a different story. Muslim leaders preached peace and urged people to protest lawfully. Write letters to politicians, they said. Some advocated boycotting Danish products, burning flags and holding rallies.

All of that was permissible under law and protected by the First Amendment to the Constitution. All was reported to the NYPD by its mosque crawlers and made its way into police files for Kelly.

“Imam Shamsi Ali brought up the topic of the cartoon, condemning them. He announced a rally that was to take place on Sunday (02/05/06) near the United Nations. He asked that everyone to attend if possible and reminded everyone to keep their poise if they can make it,” one report read.

At the Muslim Center of New York in Queens, the report said, “Mohammad Tariq Sherwani led the prayer service and urged those in attendance to participate in a demonstration at the United Nations on Sunday.”

When one Muslim leader suggested planning a demonstration, one of the people involved in the discussion about how to get a permit was, in fact, working for the NYPD.

“It seems horrible to me that the NYPD is treating an entire religious community as potential terrorists,” said civil rights lawyer Jethro Eisenstein, who reviewed some of the documents and is involved in a decades-old class-action lawsuit against the police department for spying on protesters and political dissidents.

The lawsuit is known as the Handschu case, and a court order in that case governs how the NYPD may collect intelligence.

Eisenstein said the documents prove the NYPD has violated those rules.

“This is a flat-out violation,” Eisenstein said. “This is a smoking gun.”

Browne, the NYPD spokesman, did not discuss specific investigations Thursday but told reporters that, because of the Handschu case, the NYPD operates under stricter rules than any other department in the country. He said police do not violate those rules.

His statements were intended to calm a controversy over a 2007 operation in which the NYPD mapped and photographed all of Newark’s mosques and eavesdropped on Muslim businesses. Newark Mayor Cory Booker said he was never told about the surveillance, which he said offended him.

Booker and his police director accused the NYPD of misleading them by not revealing exactly what they were doing. Had they known, they said it never would have been permitted. But Browne said Newark police were told before and after the operation and knew exactly what it entailed.

Kelly, the police commissioner, and Mayor Michael Bloomberg have been emphatic that police only follow legitimate leads of criminal activity and do not conduct preventive surveillance in ethnic communities.

Former and current law enforcement officials either involved in or with direct knowledge of these programs say they did not follow leads. The officials spoke on condition of anonymity because they were not authorized to discuss the secret programs. But the documents support their claims.

The effort highlights one of the most difficult aspects of policing in the age of terrorism. Solving crimes isn’t enough; police are expected to identify would-be terrorists and move in before they can attack.

There are no universally agreed upon warning signs for terrorism. Terrorists have used Internet cafes, stayed in hostels, worked out at gyms, visited travel agencies, attended student groups and prayed at mosques. So the NYPD monitored those areas. In doing so, they monitored many innocent people as they went about their daily lives.

Using plainclothes officers from the squad known as the Demographics Unit, police swept Muslim neighborhoods and catalogued the location of mosques. The ethnic makeup of each congregation was logged as police fanned out across the city and outside their jurisdiction, into suburban Long Island and areas of New Jersey.

“African American, Arab, Pakistani,” police wrote beneath the photo of one mosque in Newark.

Investigators looked at mosques as the center of Muslim life. All their connections had to be known.

David Cohen, the NYPD’s top intelligence officer, 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.

Even when it was clear there were no links to terrorism, the mosque informants gave the NYPD the ability to “take the pulse” of the community, as Cohen and other managers put it.

When New York Yankees pitcher Cory Lidle and his flight instructor were killed on Oct. 11, 2006, when their small plane crashed into a Manhattan high-rise apartment, fighter planes were scrambled. Within hours the FBI and Homeland Security Department said it was an accident. Terrorism was ruled out.

Yet for days after the event, the NYPD’s mosque crawlers reported to police about what they heard at sermons and among worshippers.

At the Brooklyn Islamic Center, a confidential informant “noted chatter among the regulars expressing relief and thanks to God that the crash was only an accident and not an act of terrorism,” one report reads.

“The worshippers made remarks to the effect that ‘it better be an accident; we don’t need any more heat,’” an undercover officer reported from the Al-Tawheed Islamic Center in Jersey City, N.J.

In some instances, the NYPD put cameras on light poles and trained them on mosques, documents show. Because the cameras were in public space, police didn’t need a warrant to conduct the surveillance.

Police also wrote down the license plates of cars in mosque parking lots, documents show. In some instances, police in unmarked cars outfitted with electronic license plate readers would drive down the street and record the plates of everyone parked near the mosque, former officials recalled.

“They’re viewing Muslims like they’re crazy. They’re terrorists. They all must be fanatics,” said Abdul Akbar Mohammed, the imam for the past eight years at the Masjid Imam Ali K. Muslim in Newark. “That’s not right.”