The American Civil Liberties Union sued federal immigration and transportation agencies Thursday, demanding records related to the government’s use of facial-recognition technology that the group said could pose “grave risks to privacy.”

The Freedom of Information Act lawsuit asks a federal court to demand the agencies – the Department of Homeland Security, Customs and Border Protection, the Transportation Security Administration, and Immigration and Customs Enforcement – hand over records related to the face-scanning software’s expanding role in U.S. airports and along the border.

ACLU attorneys wrote that the technology raises “profound civil-liberties concerns” and “can enable undetectable, persistent government surveillance on a massive scale.”

CBP, ICE and TSA said they do not comment on pending litigation. DHS did not immediately respond to requests for comment.

The lawsuit could shed new light on a largely opaque technology deployed by security officials nationwide. ACLU attorneys are seeking communications between the agencies and airlines, as well as details on any internal audits and guidelines governing its use.

Facial-recognition technology is used at more than 20 airports nationwide to verify travelers’ identification when flying out of the country. U.S. citizens can opt out of the scans, which officials say help speed up boarding at busy gates. Delta Air Lines also allows travelers to check their bags by submitting to a facial scan.

But privacy advocates have argued the technology could further empower officials to trace Americans en masse. ICE, the FBI, local police forces and other agencies have used the software to scan through driver’s license databases for criminal suspects.

In December, DHS dropped a proposal that would have required all citizens to have their faces scanned when entering or leaving the country.

But officials have shown interest in continuing to expand the technology’s use. At a congressional hearing last summer, a top CBP official said the agency’s facial-recognition and biometric security systems were “the envy of the world.”

ACLU sues federal agencies seeking records of facial-recognition use at airports and U.S. border