SAN FRANCISCO (CN) – The FBI cannot hide whether it uses powerful surveillance tools to monitor the social-media activity of millions of Americans and noncitizens, a federal judge ruled Monday.

U.S. District Judge Edward Chen rejected the government’s argument that acknowledging such surveillance capabilities, or the lack thereof, could reveal sensitive law enforcement techniques that would help criminals evade justice.

“The problem for defendants is that disclosure of social media surveillance – a well-known general technique – would not reveal the specific means of surveillance,” Chen wrote in a 20-page ruling.

The American Civil Liberties Union sued the U.S. Department of Justice in January, claiming the government wrongly refused to confirm or deny the existence of social media surveillance records in violation of the Freedom of Information Act.

The ACLU claims multiple government agencies are ramping up efforts to monitor activity on online social networks, a surveillance tactic that “implicates the free speech of millions of social media users.”

According to the ACLU, these surveillance activities are particularly troubling given the history of state and federal law enforcement tracking the social media activities of Black Lives Matter activists, first revealed in public records obtained by The Intercept in 2015.

The FBI in 2012 sought suggestions on how to develop a tool to “instantly search and monitor” social media activities. In 2016, it hired Pen-Link, a data analytics firm, to provide software that “parses and analyzes social media data” housed on a stand-alone server, according to public records cited in the ACLU’s court filings.

Despite the existence of those records, the FBI told the ACLU in a June 2018 letter that it could “neither confirm nor deny” the existence of information about its social media surveillance policies, guidelines, data analytic systems, and communications with private contractors.

The Justice Department insisted it has a right to invoke “Glomar,” the term used for official responses that neither confirm nor deny information, under FOIA exemption 7(E). That exemption permits withholding information that would reveal law enforcement techniques or procedures that “could reasonably be expected to risk circumvention of the law.”

An FBI assistant chief responsible for processing FOIA requests stated in a declaration that confirming the existence or nonexistence of those records “would provide criminals or terrorists with a key piece of investigative information” to predict how the FBI uses social media surveillance tools or to exploit blind spots if certain records do not exist.

Judge Chen found the government’s position legally flawed, noting that merely acknowledging the existence of records does not mean those records must be publicly disclosed or that specific techniques and procedures must be revealed.

Chen noted that several other government agencies, including the Department of Homeland Security, Customs and Border Patrol, U.S. Citizenship and Immigration Services, Immigration and Customs Enforcement, and the State Department have acknowledged using social media surveillance tools.

If the FBI were to reveal that it lacks certain capabilities, the fact that other government agencies can monitor social media “lessens the risk that people will be emboldened by the FBI’s disclosure to spread criminal or terrorist messages through social media,” Chen wrote.

The judge further noted that if the FBI stated it has no records of acquiring certain surveillance tools, “that does not mean that the FBI has no such tools at its disposal, as it could have developed such tools internally.”

Chen denied the government’s motion for partial summary judgment on its right to issue a Glomar response refusing to confirm or deny the existence of records.

ACLU attorney Hugh Handeyside called Chen’s ruling “an important confirmation of the public’s right to access information about the extent of the FBI’s surveillance of social media, which discourages people from speaking freely online and can harm immigrants and communities of color. We will continue to press the FBI to produce all responsive records promptly.”

The U.S. Department of Justice did not immediately return an email request for comment Monday.