A new requirement recently imposed under President Trump’s “extreme vetting” program, an outgrowth of his odious Muslim ban, threatens the online freedoms of millions around the world – and by extension, our own.

The little-noticed requirement, which the state department adopted in May, compels nearly everyone wishing to visit or move to the US from abroad to register their social media handles with the US government. The requirement enables government surveillance of more than 14 million visa applicants every year, even long after these would-be visitors and newcomers set foot on US soil.

This means that social media posts, photos, “likes” and other personal data – including visa applicants’ communications with their American colleagues, friends, and family members – are all subject to largely unrestricted government scrutiny. Once collected, applicants’ social media information is retained indefinitely, shared widely within the government, and even disclosed, in some circumstances, to foreign governments.

The social media registration requirement tramples on the guarantees of free expression and association enshrined in the first amendment. By demanding that all visa applicants – international students, journalists, tourists, academics, businesspeople, you name it – disclose how they identify themselves on Facebook, Twitter, Instagram and other major platforms, the state department is conditioning their ability to visit, work or live in US on their willingness to subject their speech to government surveillance. This dragnet chills visa applicants’ online expression and deprives the rest of us of opportunities to hear their views.

The requirement poses a particular threat to people who use pseudonymous social media handles. As Twitter put it in comments opposing the requirement, one of the platform’s “hallmarks is that users may engage in anonymous speech to express opinions that may be challenging or unpopular, or to otherwise comment on issues without fear of reprisal”.

As people around the world increasingly rely on social media to advocate social and political change, many foreign governments – including some US allies – now turn to social media to hunt down journalists, activists and dissidents for retaliation. The risk that the social media information of visa applicants from Saudi Arabia, Turkey or Russia will end up in the hands of their hostile home governments dramatically deters them from speaking freely and associating with others online.

Anonymous or not, and even if their home countries aren’t repressive, visa applicants are much likelier to self-censor on social media now that they know that state department officials may comb through their online posts. Those who engage in criticism of the government or other controversial speech can plausibly expect additional scrutiny or delays in processing. Some worry enough that they feel obliged to stop using social media for political speech, to scrub their accounts, or even to delete them altogether.

And there are those who fear that the government will misinterpret their speech on social platforms or find them inadmissible by distant association. This past August, for example, border agents denied entry to an incoming Harvard freshman based on his friends’ political posts on social media, sending him back to Lebanon before allowing him to return nine days later. Under the new requirement, these kinds of misinterpretations of social media accounts are bound to increase.

Indeed, the state department is ill-equipped to interpret social media language. Retweets, likes and shares, we’re often told, do not necessarily signify endorsement of the views expressed. But the government has no meaningful way of determining what that online activity means, if it means anything at all – especially in view of language differences and cultural nuances that are prevalent across the internet.

Despite these difficulties, the government argues that the registration requirement is necessary to verify visa applicants’ identities and to assess their eligibility for visas. This argument doesn’t hold up. For one thing, the government’s own studies undermine its claim that the registration requirement is necessary, or even effective, toward those ends. On repeated occasions, different DHS sub-agencies have piloted social media screening policies and practices, only to later conclude that their pilots were flawed and thus failed to show that social media screening is an effective vetting tool. The state department casually disregarded these conclusions, along with the nearly 10,000 public comments opposing the requirement.

Like other agencies under the Trump administration, which keeping losing court challenges to new policies, the state department has failed to articulate how the social media registration requirement improves upon the existing visa-screening system. That system already authorizes consular officers to demand additional information from individual applicants whenever they deem it necessary to assess the applicants’ identities or admissibility. Sweeping up social media information en masse under a blanket requirement is superfluous at best.

With the hopes of putting an end to all this overreach, Doc Society and the International Documentary Association – a pair of documentary film organizations based in the US – have sued the US Department of State and Department of Homeland Security in federal court to halt enforcement of the new requirement. (The Knight First Amendment Institute, the Brennan Center for Justice and Simpson Thacher & Bartlett represent them.) The film-makers they work with, who hail from all over the globe and have significant ties to the US, fear that the social media registration requirement will compromise their ability to create and disseminate their work. This fear is particularly pronounced for film-makers who maintain anonymity online because their art and expression focus on sensitive social and political issues.

Punishing foreign film-makers and other visa applicants with needless social media surveillance is not just another instance of the government’s dim view of our interconnected world. The registration requirement violates our core constitutional commitment to freedom of expression. The state department should abandon it; otherwise, the courts must invalidate it.