SAN FRANCISCO (CN) – New details on the government’s secret telephone data-mining program may soon emerge after a federal judge on Monday ordered the release of previously withheld files.

U.S. Magistrate Judge Maria-Elena James directed the Department of Justice to partially release 78 pages of emails and documents on the covert Hemisphere Project, which gives government investigators access to a massive trove of phone call and location data without obtaining warrants.

Electronic Frontier Foundation attorney Aaron Mackey said he is hopeful the files will shed more light on a spying program that privacy advocates have denounced as a blatant violation of Americans’ civil liberties.

“Hemisphere is, to our knowledge, the largest domestic surveillance program that involves amassing millions of records about everyone’s phone calls, and that information can display a profound amount of private information about who you call, where you’re located when you make calls and who you were associated with,” Mackey said.

The Electronic Frontier Foundation, a nonprofit watchdog, sued the Justice Department in July 2015 after it refused to release files on the Hemisphere Project. The covert program, revealed in a New York Times article in September 2013, involved placing AT&T employees in law enforcement agencies to track records on trillions of phone calls dating back to 1987.

In October 2016, the Daily Beast revealed that AT&T designed and marketed Hemisphere as a spying tool for government agencies. AT&T enters into contracts with local, state and federal government agencies.

The company hands over customers’ private data without a warrant in exchange for millions of dollars in taxpayer money each year, and it requires that the government keep the source of that data confidential, according to a 2015 contract between AT&T and the Atlanta Police Department and other government budget documents and public records.

Email discussions and PowerPoint presentations make up the bulk of files that will be released under the court order issued Monday. Mackey said he believes those documents will answer at least some lingering questions about the Hemisphere program.

“We have a lot of basic questions about how it works, who’s involved and what’s required to participate in the program,” Mackey said.

In its original lawsuit, EFF demanded details on the program’s capabilities, processes, law enforcement agencies and telecom companies involved and cities and states where the program operates.

In a prior ruling, James rejected the government’s position that revealing other technology firms involved in the program would undermine assurances of confidentiality given to them when they agreed to participate.

On Monday, James ordered the release of 16 of 35 disputed sets of documents after reviewing the records behind closed doors. The judge sided with the government in its decision to withhold most of the requested records, finding their release could compromise law enforcement investigations and help criminals evade prosecution.

The judge refused to order the release of AT&T’s contract with the Justice Department and emails from September 2012 discussing that contract. However, the judge did order the release of other emails discussing AT&T’s contract with the federal government from August 2010.

The Justice Department had argued that all the records were protected from disclosure under FOIA exemptions for attorney-client privilege, deliberative process privilege and information that could reveal confidential sources or law enforcement techniques.

Responding to arguments that disclosing program details could interfere with law enforcement’s ability to do its job, Mackey challenged the notion that Americans’ privacy must be sacrificed for public safety.

“If you think protecting the public from criminals involves invading millions of people’s privacy rights who are not themselves suspected of any sort of criminal conduct, but you feel like you have to surveil everyone, then I question the premise of whether you’re protecting the public,” Mackey said.

Abraham Simmons, spokesman for the Justice Department in Northern California, declined to comment on the ruling.

AT&T did not immediately respond to emails seeking comment Monday afternoon.

The judge ordered the Justice Department to turn over 16 sets of documents on the Hemisphere program within three weeks.

The documents will be redacted to protect the names and contact information of individual federal employees and private contractors.