Zein Rimawi, 59, second from right, a leader and founder of the Islamic Society of Bay Ridge and mosque, meet with members in his office before a Jumu'ah prayer service at the mosque on Friday, Aug. 16, 2013 in Brooklyn, N.Y. The NYPD targeted his mosque as a part of a terrorism enterprise investigation beginning in 2003, spying on it for years. The mosque has never been charged as part of a terrorism conspiracy. Zein Rimawi, 59, center, a leader and founder of the Islamic Society of Bay Ridge and mosque, join a congregation for a Jumu'ah prayer service at the mosque on Friday, Aug. 16, 2013, in Brooklyn borough of New York. The NYPD targeted his mosque as a part of a terrorism enterprise investigation beginning in 2003, spying on it for years. A Muslim congregation pray during a Jumu'ah prayer service at the Islamic Society of Bay Ridge mosque on Friday, Aug. 16, 2013 in Brooklyn borough of New York. The New York Police Department targeted this mosque as a part of a terrorism enterprise investigation beginning in 2003, spying on it for years. Dr. Muhamad Albar, far left, speaks to a congregation during Jumu'ah prayer service at the Islamic Society of Bay Ridge mosque on Friday, Aug. 16, 2013 in the Brooklyn borough of New York. Members of a Muslim congregation pray during a Jumu'ah prayer service at the Islamic Society of Bay Ridge mosque on Friday, Aug. 16, 2013 in the Brooklyn borough of New York. NEW YORK (AP) - The New York Police Department has secretly labeled entire mosques as terrorist organizations, a designation that allows police to use informants to record sermons and spy on imams, often without specific evidence of criminal wrongdoing. Designating an entire mosque as a terrorism enterprise means that anyone who attends prayer services there is a potential subject of an investigation and fair game for surveillance. Since the 9/11 attacks, the NYPD has opened at least a dozen "terrorism enterprise investigations" into mosques, according to interviews and confidential police documents. The TEI, as it is known, is a police tool intended to help investigate terrorist cells and the like. Many TEIs stretch for years, allowing surveillance to continue even though the NYPD has never criminally charged a mosque or Islamic organization with operating as a terrorism enterprise. The documents show in detail how, in its hunt for terrorists, the NYPD investigated countless innocent New York Muslims and put information about them in secret police files. As a tactic, opening an enterprise investigation on a mosque is so potentially invasive that while the NYPD conducted at least a dozen, the FBI never did one, according to interviews with federal law enforcement officials. The strategy has allowed the NYPD to send undercover officers into mosques and attempt to plant informants on the boards of mosques and at least one prominent Arab-American group in Brooklyn, whose executive director has worked with city officials, including Bill de Blasio, a front-runner for mayor. The revelations about the NYPD's massive spying operations are in documents recently obtained by The Associated Press and part of a new book, "Enemies Within: Inside the NYPD's Secret Spying Unit and bin Laden's Final Plot Against America." The book by AP reporters Matt Apuzzo and Adam Goldman is based on hundreds of previously unpublished police files and interviews with current and former NYPD, CIA and FBI officials. The disclosures come as the NYPD is fighting off lawsuits accusing it of engaging in racial profiling while combating crime. Earlier this month, a judge ruled that the department's use of the stop-and-frisk tactic was unconstitutional. The American Civil Liberties Union and two other groups have sued, saying the Muslim spying programs are unconstitutional and make Muslims afraid to practice their faith without police scrutiny. Both Mayor Mike Bloomberg and Police Commissioner Raymond Kelly have denied those accusations. Speaking Wednesday on MSNBC's Morning Joe, Kelly reminded people that his intelligence-gathering programs began in the wake of 9/11. "We follow leads wherever they take us," Kelly said. We're not intimidated as to wherever that lead takes us. And we're doing that to protect the people of New York City. The NYPD did not limit its operations to collecting information on those who attended the mosques or led prayers. The department sought also to put people on the boards of New York's Islamic institutions to fill intelligence gaps. One confidential NYPD document shows police wanted to put informants in leadership positions at mosques and other organizations, including the Arab American Association of New York in Brooklyn, a secular social-service organization. Linda Sarsour, the executive director, said her group helps new immigrants adjust to life in the U.S. It was not clear whether the department was successful in its plans. The document, which appears to have been created around 2009, was prepared for Kelly and distributed to the NYPD's debriefing unit, which helped identify possible informants. Around that time, Kelly was handing out medals to the Arab American Association's soccer team, Brooklyn United, smiling and congratulating its players for winning the NYPD's soccer league. Sarsour, a Muslim who has met with Kelly many times, said she felt betrayed. "It creates mistrust in our organizations," said Sarsour, who was born and raised in Brooklyn. It makes one wonder and question who is sitting on the boards of the institutions where we work and pray. Before the NYPD could target mosques as terrorist groups, it had to persuade a federal judge to rewrite rules governing how police can monitor speech protected by the First Amendment. The rules stemmed from a 1971 lawsuit, dubbed the Handschu case after lead plaintiff Barbara Handschu, over how the NYPD spied on protesters and liberals during the Vietnam War era. David Cohen, a former CIA executive who became NYPD's deputy commissioner for intelligence in 2002, said the old rules didn't apply to fighting against terrorism. Cohen told the judge that mosques could be used "to shield the work of terrorists from law enforcement scrutiny by taking advantage of restrictions on the investigation of First Amendment activity." NYPD lawyers proposed a new tactic, the TEI, that allowed officers to monitor political or religious speech whenever the "facts or circumstances reasonably indicate" that groups of two or more people were involved in plotting terrorism or other violent crime. The judge rewrote the Handschu rules in 2003. In the first eight months under the new rules, the NYPD's Intelligence Division opened at least 15 secret terrorism enterprise investigations, documents show. At least 10 targeted mosques. Doing so allowed police, in effect, to treat anyone who attends prayer services as a potential suspect. Sermons, ordinarily protected by the First Amendment, could be monitored and recorded. Among the mosques targeted as early as 2003 was the Islamic Society of Bay Ridge. I have never felt free in the United States. The documents tell me I am right," Zein Rimawi, one of the Bay Ridge mosque's leaders, said after reviewing an NYPD document describing his mosque as a terrorist enterprise. Rimawi, 59, came to the U.S. decades ago from the Israeli-occupied West Bank. "Ray Kelly, shame on him," he said. I am American. The NYPD believed the tactics were necessary to keep the city safe, a view that sometimes put it at odds with the FBI. In August 2003, Cohen asked the FBI to install eavesdropping equipment inside a mosque called Masjid al-Farooq, including its prayer room. Al-Farooq had a long history of radical ties. Omar Abdel Rahman, the blind Egyptian sheik who was convicted of plotting to blow up New York City landmarks, once preached briefly at Al-Farooq. Invited preachers raged against Israel, the United States and the Bush administration's war on terror. One of Cohen's informants said an imam from another mosque had delivered $30,000 to an al-Farooq leader, and the NYPD suspected the money was for terrorism. But Amy Jo Lyons, the FBI assistant special agent in charge for counterterrorism, refused to bug the mosque. She said the federal law wouldn't permit it. The NYPD made other arrangements. Cohen's informants began to carry recording devices into mosques under investigation. They hid microphones in wristwatches and the electronic key fobs used to unlock car doors. Even under a TEI, a prosecutor and a judge would have to approve bugging a mosque. But the informant taping was legal because New York law allows any party to record a conversation, even without consent from the others. Like the Islamic Society of Bay Ridge, the NYPD never demonstrated in court that al-Farooq was a terrorist enterprise but that didn't stop the police from spying on the mosques for years. And under the new Handschu guidelines, no one outside the NYPD could question the secret practice. Martin Stolar, one of the lawyers in the Handschu case, said it's clear the NYPD used enterprise investigations to justify open-ended surveillance. The NYPD should only tape conversations about building bombs or plotting attacks, he said. Every Muslim is a potential terrorist? It is completely unacceptable," he said. It really tarnishes all of us and tarnishes our system of values. Al-Ansar Center, a windowless Sunni mosque, opened in Brooklyn several years ago, attracting young Arabs and South Asians. NYPD officers feared the mosque was a breeding ground for terrorists, so informants kept tabs on it. One NYPD report noted that members were fixing up the basement, turning it into a gym. "They also want to start Jiujitsu classes," it said. The NYPD was particularly alarmed about Mohammad Elshinawy, 26, an Islamic teacher at several New York mosques, including Al-Ansar. Elshinawy was a Salafist - a follower of a puritanical Islamic movement - whose father was an unindicted co-conspirator in the 1993 World Trade Center attacks, according to NYPD documents. The FBI also investigated whether Elshinawy recruited people to wage violent jihad overseas. But the two agencies investigated him very differently. The FBI closed the case after many months without any charges. Federal investigators never infiltrated Al-Ansar. "Nobody had any information the mosque was engaged in terrorism activities," a former federal law enforcement official recalled, speaking on condition of anonymity because he wasn't authorized to discuss the investigation. The NYPD wasn't convinced. A 2008 surveillance document described Elshinawy as "a young spiritual leader (who) lectures and gives speeches at dozens of venues" and noted, "He has orchestrated camping trips and paintball trips." The NYPD deemed him a threat in part because "he is so highly regarded by so many young and impressionable individuals." No part of Elshinawy's life was out of bounds. His mosque was the target of a TEI. The NYPD conducted surveillance at his wedding. An informant recorded the wedding and police videotaped everyone who came and went. "We have nothing on the lucky bride at this time but hopefully will learn about her at the service," one lieutenant wrote. Four years later, the NYPD was still watching Elshinawy without charging him. He is now a plaintiff in the ACLU lawsuit against the NYPD. "These new NYPD spying disclosures confirm the experiences and worst fears of New York's Muslims," ACLU lawyer Hina Shamsi said. From houses of worship to a wedding, there's no area of New York Muslim religious or personal life that the NYPD has not invaded through its bias-based surveillance policy. Online: Documents TEI Discontinuance: http://apne.ws/146zqF9 Informant Profiles: http://apne.ws/1aNfuyH Elshinawy Surveillance: http://apne.ws/15fau4D Handschu Minutes: http://apne.ws/1cenpD6 AP's Washington investigative team can be reached at DCinvestigations@ap.org Follow Goldman and Apuzzo at http://twitter.com/adamgoldmanap and http://twitter.com/mattapuzzo