The top federal court that oversees national security surveillance found the FBI routinely failed to observe rules meant to protect the privacy of Americans while searching through emails that were gathered without a warrant, according to a December ruling declassified Friday.

Despite identifying widespread violations by analysts conducting these searches, a judge still approved the warrantless surveillance program for another year, the ruling also stated.

The ruling, which was outlined in a heavily-redacted 83-page document, was part of the regular certification process for the use of surveillance techniques enabled by Section 702 of the Foreign Intelligence Surveillance Act (FISA), including the warrantless surveillance program that allows the US government to collect emails and phone calls from non-citizens abroad even when they are communicating with Americans.

The redacted ruling was posted Friday to a website run by the Office of the Director of National Intelligence. The New York Times first reported the contents of the ruling.

The work of the Foreign Intelligence Surveillance Court is mostly secret because most of the subject matter it deals with is highly classified.

While Judge James Boasberg, who is the presiding judge on the surveillance court, again signed off on the program, he also issued a scathing rebuke of the FBI, writing that there still appear to be widespread violations of the querying standard.

The violations identified by the surveillance court concerned improper searches for information on Americans the FBI made of the database composed of intelligence collected through 702 surveillances. While this surveillance is aimed only at foreign nationals, the names and communications of American citizens and those living in the US are often swept up in the intercepted content, prompting concerns from civil liberty advocates.

According to the December 2019 ruling, the problematic searches made by the FBI were not likely to return foreign intelligence information or evidence of a crime – the statutory requirements for the use of the database by the FBI.

Some of the data was accessed during routine checks for people visiting an FBI office or for police officer candidates, Boasberg writes.

Boasberg noted in his ruling that in August 2019, the government used as part of an investigation non-publicly available information on 16,000 individuals gathered as part of the program. A review conducted by the Department of Justice’s National Security Division found that searches for only seven of those persons satisfied the statutory requirements while the others did not, he said in his ruling.

The FBI maintained that the queries for all 16,000 individuals were reasonably likely to return foreign intelligence information or evidence of a crime, the ruling stated, but reasoning behind that argument is redacted.

Based on the facts reported, the FBI’s position that the queries for all 16,000 persons were reasonably likely to retrieve foreign-intelligence information or evidence of a crime is unsupportable, the court opinion released Friday added.

The court also said that the FBI disclosed some of its analysts violated rules which are supposed to protect information about people in the US from being used in criminal investigations that don’t relate to national security. The law requires the FBI to seek the surveillance’s court’s permission to access such data, but the FBI has never sought such a court order according to the ruling.

Instead, because of the way the FBI computer system is designed, some of the protected information displays on screen. In some cases, FBI analysts took active steps to access restricted information, according to the ruling. And the court found that the bureau didn’t disclose the violations in a timely manner.

The recently reported querying violations suggest that some FBI personnel still need such help. That is not altogether surprising. As discussed above, the FBI is really just starting to implement that documentation requirement on a comprehensive basis. For that reason, the improper queries described above do not undermine the Court’s prior determination that, with that requirement, the FBI’s querying and minimization procedures meet statutory and Fourth Amendment requirements, the ruling stated.

Asked for a response to the court’s ruling, a senior FBI official told CNN that, as of last December, a written justification is required to seek data previously gathered from the warrantless surveillance program. Prior to running a query about people in the US whose information is housed in storage systems of data collected by the program, bureau analysts must complete a written justification to articulate why they believe a standard has been met for authorizing a query on the data.