A group of filmmakers have sued the US government for making visa applicants hand over details about their social media accounts. The lawsuit argues that the requirement unconstitutionally discourages applicants from speaking online — and, conversely, discourages people who post political speech from trying to enter the US.

The US government has ramped up social media surveillance as part of President Donald Trump’s “extreme vetting” of immigrants. After initially asking a subset of applicants to provide information voluntarily, the State Department recently began requiring most visa applicants to list all social media accounts they’ve used in the past five years.

This lawsuit, filed by the Doc Society and the International Documentary Association, challenges the decision on First Amendment grounds. It calls the registration system “the cornerstone of a far reaching digital surveillance regime” that makes would-be visitors provide “effectively a live database of their personal, creative, and political activities online” — which the government can monitor at any time, long after the application process has been completed. Applicants must even disclose accounts that they use pseudonymously, and if US authorities fail to keep that information secure, it could potentially endanger people who are trying to avoid censorship from a repressive foreign government.

The lawsuit warns of “a far reaching digital surveillance regime”

Social media can be a minefield for people visiting the US, because posts can be easily misinterpreted by immigration officials. Earlier this year, an incoming Harvard freshman was blocked from entering the US apparently because his friends had made posts critical of the US government. (He was later readmitted.) Meanwhile, there’s little concrete evidence that the increased vetting has had positive effects on national security. And it’s part of a larger expansion of surveillance at the border — which can affect citizens and noncitizens alike. Earlier this month, the Department of Homeland Security revealed that it wanted to expand facial recognition usage to encompass identifying US citizens as they enter and exit the US, although it backed off this decision under criticism.

The plaintiffs in this lawsuit say that some non-US members have begun deleting social media content or stopped expressing themselves online because they’re afraid it will complicate their ability to enter the US. Others have decided to stop working in the country because they don’t want to reveal their social media accounts. “The Registration Requirement enables the government to compile a database of millions of people’s speech and associations, which it can cross-reference to glean more information about any given visa applicant,” warns the suit. And “the government’s indefinite retention of information collected through the Registration Requirement further exacerbates the requirement’s chilling effect because it facilitates surveillance into the future.”

Update 2:40PM ET: Updated to note the DHS backing off facial recognition plans.