Moreover, much of the NYPD’s spying has apparently occurred outside its legal jurisdiction, which is New York City.

The latest in a series of Associated Press articles on the department’s Demographics Unit—whose very existence has been repeatedly if implausibly denied by the department’s chief spokesman, Paul Browne—described how detectives from the Intelligence Division spied on Muslim neighborhoods in Newark, despite no evidence of criminality.

Newark Mayor Cory Booker, usually a steadfast ally of New York Mayor Michael Bloomberg’s, blasted the NYPD for misleading him and his city.

“If anyone in my police department had known this was a blanket investigation of individuals based on nothing but their religion, that strikes at the core of our beliefs and my beliefs very personally, and it would have merited a far sterner response,” Booker said.

Equally disturbing: Newark’s police commissioner at the time was Garry McCarthy, a former top NYPD official.

New Jersey Gov. Chris Christie, the state’s top federal prosecutor in 2007, when the spying occurred, said he didn’t recall the NYPD ever approaching him about its surveillance or about a threat that would justify it. “The NYPD has at times developed a reputation of asking forgiveness rather than permission,” he said.

The question now isn’t merely whether the NYPD broke the law. That’s complicated. Websites, for example, are obviously in the public domain.

But in supposedly fighting terrorism, the New York City Police Department acted unilaterally, not informing college administrators, misleading local officials, and obscuring their actions from their natural law-enforcement partner in fighting terrorism—the FBI.

Why was the NYPD allowed to go beyond the city limits and to spy on Americans solely because of their religion?

The roots of this apparent abuse of power start with the trauma of Sept. 11. The terrorist attacks emboldened incoming Police Commissioner Ray Kelly to dismiss the feds for failing to protect the city and to transform the NYPD into a mini-CIA—with Kelly in sole command. In his first days as commissioner, the new commissioner publicly denigrated the FBI and presented himself as the lone man standing between the city and another terrorist attack.

Kelly hired a former top CIA official, David Cohen, who shared his disdain for the bureau and who revamped and enlarged the NYPD’s Intelligence Division, making it a rival to the FBI. Cohen assigned NYPD detectives overseas, their expenses paid for by the nonprofit Police Foundation funded by wealthy New Yorkers and increasingly used by Kelly as a private cash source for himself and his department. One of the NYPD’s first battles with the bureau came in 2004, after the Madrid train bombings. NYPD detectives were rushed to Madrid. Their assignment: interview Spanish police officials before the FBI did.

Not only the city but the entire country fell into step behind Kelly. FBI Director Robert Mueller never opened his mouth to protest Kelly’s denigrating remarks or his aggressive overseas barbs.

Even after Cohen nearly blew the case against would-be subway bomber Najibullah Zazi by having detectives secretly contact an informant who tipped off Zazi’s father, President Obama telephoned Kelly to congratulate him on Zazi’s capture.

Why was the NYPD allowed to go outside of the city and to spy on Americans solely because of their religion?

Cohen also began sending detectives on out-of-state antiterrorism forays. While writing for Newsday in October 2003, I reported that Intelligence Division detectives had conducted a telephone sting of scuba shops along the New Jersey shore and had attempted to insert themselves into an investigation into the theft of explosives in Carlisle, Pa.

When New Jersey authorities learned of the sting, they were furious. The state’s counterterrorism director, Sidney J. Caspersen, wrote that his office had “informed the NYPD Intelligence Division to cease and desist all such activity in the state of New Jersey.”

That same Sidney J. Caspersen now works for the NYPD as an assistant commissioner of programs in the Intelligence Division.

Federal and local law-enforcement officials in Carlisle were equally upset when NYPD detectives showed up at their crime scene and began questioning witnesses. “We mainly informed them [the detectives] that the investigation was being handled by us and the FBI,” said Jeff Rudolph, the North Middleton Township police chief at the time, “and that if we need their help we will give them a call.”

Yet few in New York raised questions about the Intelligence Division. Indeed, so entranced was the city’s establishment with Kelly that Bloomberg, a dilettante on police matters, allowed him more power and less accountability than any police commissioner in the city’s history.

Both the national and New York City media were taken with Kelly. The NewYorkPost and DailyNews have repeatedly attacked the AP as naive and misguided for reporting on the department’s spying on Muslims, instead applauding Kelly for keeping the city safe from another terrorist attack. The NewYorkTimes hasonlyrecently begun to awaken from its 10-year slumber.

Bloomberg appears deaf, dumb, and blind to Kelly’s excesses, unwilling or unable to rein in his police commissioner. Running for his first term as mayor in 2001, Bloomberg promised more transparency in the police department than had existed under his predecessor, Mayor Rudy Giuliani. Instead, he has allowed Kelly to literally close the department to public scrutiny.

After Yale’s president wrote an angry letter objecting to the operation, which the Yale Police Department was “entirely unaware of,” Bloomberg smirked: "I don’t known why keeping the country safe is antithetical to the values of Yale.” Asked several more questions by skeptical reporters about reports that the police had gone so far as to send an undercover agent on a white-water-rafting trip—where he noted the names and frequency of prayer of students who are not known to have been suspected of any criminal wrongdoing—Bloomberg repeatedly talked about a rafting trip he took with his daughter, as though the questions didn’t warrant a serious response.

No one outside the department is supervising it—especially Cohen’s Intelligence Division.

Bloomberg has neglected his duty to monitor the NYPD. The result has been a department left to police itself—and that appears to have morphed into a law-enforcement agency increasingly inclined to bend or break the law.

“What safeguards are there to ensure that the NYPD doesn’t break the law?” a top former NYPD terrorism official said to me in 2009. “What mechanisms are in place to ensure that the NYPD does not become a rogue organization?”