A federal judge on Tuesday blocked US President Donald Trump’s administration from enforcing a policy that targets foreign nationals who study disinformation and hate speech on social media for visa denials and deportation.

Chief US District Judge James Boasberg in Washington sided with the Coalition for Independent Technology Research in finding that the administration’s policy likely unlawfully burdens the speech of non-citizen researchers in the United States in violation of the US Constitution’s First ‌Amendment.

The group’s lawsuit ‌alleged that the US State Department, while claiming ​it ‌is ⁠fighting online ​censorship ⁠that Trump’s allies have argued has affected conservative speech on social media, had been engaged in a far-reaching campaign of censorship targeting researchers and anti-disinformation advocates.

Boasberg, who was appointed by Democratic President Barack Obama, agreed, saying the policy treated non-citizens’ research and advocacy in favor of greater content moderation as the basis for visa denials, exclusion or removal in violation of the First Amendment’s free speech ⁠protections.

He said non-citizens, including researchers working with the San Francisco-based ‌group, “could reasonably understand the policy to place their ‌immigration status at risk — not because they wield ​foreign sovereign power or facilitate ‌its censorship, but simply because they work in content moderation.”