Executive Order 12333 and the National Security Act of 1947 prohibit the CIA from engaging in domestic spying. But according to a recently declassified report from the CIA's inspector general, four CIA operatives were embedded with the NYPD in the years after 9/11, and one of them "believed he had 'no limitations' as far as what he could or could not do."

According to the report, that agent, who was on unpaid leave from the CIA, worked for the NYPD at the request of Commissioner Ray Kelly and led “NYPD investigations, operations, and surveillance activities directed at US persons and non-US persons.” Another agent interviewed for the report stated he received "unfiltered" NYPD reports containing information lacking any foreign intelligence.

NYPD spokesman Paul Browne told the Times that no improprieties occurred. “We’re proud of our relationship with C.I.A. and its training,” Browne said.

A CIA spokesman added, "None of the support we have provided to NYPD can rightly be characterized as ‘domestic spying’ by the CIA. Any suggestion along those lines is simply wrong.”

But while David Buckley, the CIA inspector general who prepared the report in 2011, noted that there was "no evidence" that the agency violated federal law in its operations with the NYPD, he did express concern about "irregular personnel practices, the lack of formal documentation in some important instances," from which he concluded

The risks associated with the Agency's relationship with the NYPD were not fully considered and that there was inadequate direction and control by the Agency managers responsible for the relationship.

In other words: if the documentation was bad, who the hell knows what actually happened is happening?

The CIA's collaboration with the NYPD was noted by the AP in 2011 as part of its Pulitzer Prize-winning series on the department's far-reaching Muslim surveillance program. The report stated that the CIA had sent agents to assist the NYPD in intelligence gathering, and had trained an NYPD detective at its spy school in Virginia, sending him back to New York to practice what he learned.

David Cohen, a former high-echelon CIA employee, was tapped to lead the NYPD's intelligence gathering activities in 2002, and is currently the Deputy Commissioner of the Intelligence Division.

But this IG report reveals for the first time how many agents were assigned to New York. It also reveals that one of the CIA operative's missions was to "improve [the NYPD's] volatile relationship with the local FBI and specifically the FBI-led Joint Terrorism Task Force."

You'll recall that a major source of friction between the FBI and the NYPD can be seen in the FBI's unwillingness to play a part in some of the NYPD's flashier terrorism arrests in recent years, which appear to display the department's penchant for hand-holding disturbed, petty criminals rather than catching hardened terrorists.

Ginger McCall, a spokeswoman for the Electronic Privacy Information Center, which received the report from a FOIL request, said “Despite the assurances of the C.I.A.’s press office, the activities documented in this report cross the line and highlight the need for more oversight.”

We may get a closer look at the NYPD's collaboration with the CIA in court: Muslim and civil liberties groups sued the department for their surveillance activities (which by the NYPD's own admission haven't produced any actionable intelligence) earlier this month.