A federal judge ​on Tuesday blocked U.S. 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.

According to Reuters, Chief U.S. 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 U.S. Constitution’s First Amendment.

The group’s lawsuit alleged that the U.S. 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.”

Carrie DeCell, a lawyer for the coalition at the Knight ​First Amendment Institute at Columbia University, in a statement welcomed the judge’s ruling, which she said “recognized the serious constitutional harms this policy ‌is already ⁠causing.”

“This policy punishes researchers for work the public needs and the First Amendment protects,” DeCell said.

The State Department did not immediately respond to a request for comment.

The administration has made free speech, particularly what it sees as the stifling of conservative voices online, a focus of its foreign policy, including in Brazil and in Europe.

In May, Secretary of State Marco ​Rubio announced a visa ban ​on foreign nationals “complicit in censoring ⁠Americans.” Rubio said some foreign officials have engaged in “flagrant censorship actions against U.S. tech companies and U.S. citizens and residents when they have no authority to do so.”

In December, ​the State Department imposed visa bans on five Europeans, including a former European Union commissioner and ​anti-disinformation activists whom ⁠Rubio called “leading figures of the global censorship-industrial complex.”

The department did so after EU tech regulators that month fined Elon Musk’s social media company X €120 million ($140 million) in the first sanction imposed under the EU’s landmark Digital Services Act, which is intended to ⁠combat hateful ​speech, misinformation and disinformation.

Among the five hit by the visa ban were ​Imran Ahmed, the British CEO of the U.S.-based Center for Countering Digital Hate, and Clare Melford, co-founder of the Global Disinformation Index. Their groups are ​members of the Coalition for Independent Technology Research, the lawsuit said.