Law enforcement records released on Tuesday following a New York Civil Liberties Union lawsuit confirmed that local police are being forced by the FBI to deny having “stingray technology”—part of an apparatus used to conduct dragnet cell phone surveillance.

The documents divulge details about a non-disclosure agreement that the FBI entered into with the Erie County Sheriff’s office, and make the case that transparency “could result in the FBI’s inability to protect the public from terrorism and other criminal activity.”

“Law enforcement agencies increasingly rely on wireless collection equipment/technology to conduct lawfully-authorized electronic surveillance,” the agreement stated.

The agreement specifically mentions the press, and includes a blanket ban on the sheriff’s office publicizing in any way its use of stingray technology. It even instructs the sheriff’s office to not disclose details about stingrays in court beyond the “evidentiary results.”

As part of the agreement, the FBI also reserved the right to urge the sheriff’s office to drop charges in the event that trial proceedings would risk revealing sensitive information about the stingray program

The stingray technology, in question, was being used by the Erie County Sheriff to conduct aerial surveillance.

Because of the restrictions, the court-mandated document dump on Tuesday provided much-needed insight into the FBI has interacted with its local partners.

The Chairman and Ranking Member of the Senate Judiciary Committee, Chuck Grassley (R-Iowa) and Patrick Leahy (D-Vt.), have penned two letters this year to the Justice Department asking for more information about the domestic surveillance tools.

One of their concerns, that the police haven’t sought the “appropriate legal process” to conduct the operations, appears well-founded following this week’s publication.

While the Justice Department has promised that stingray surveillance flights are “lawfully-authorized,” only one in 47 flights conducted by the Erie County Sheriff occurred after officials obtained a judge’s prior permission.

“These records confirm some of the very worst fears about local law enforcement’s use of this expensive and intrusive surveillance equipment,” NYCLU Staff Attorney Mariko Hirose said in a statement on Tuesday.

“Not only did the Sheriff’s Office promise the FBI breathtaking secrecy to keep information about stingrays as hidden as possible, it implemented almost no privacy protections for the Erie County residents it is sworn to protect and serve,” Mariko added.

The stingray program revealed late last year is used by law enforcement officials to collect cell phone data, including location information. The technology was first developed by the Central Intelligence Agency.