A federal judge pointed to President Donald Trump’s shockingly disparaging comments about immigrants and foreigners in his ruling that allows a lawsuit to proceed that seeks to block a census question on citizenship status.

U.S. District Judge George Hazel said in a ruling in Maryland on Friday that plaintiffs had properly supported their claim that a Trump administration decision to add a citizenship question to the census for the first time in 70 years was motivated at least in part by discrimination.

In reaching his decision he cited Trump’s widely reported comment in January at a private meeting with lawmakers “distinguishing immigrants of color— ‘these people from shithole countries’—from white immigrants from countries like Norway,” the judge wrote.

Hazel also noted Trump’s “degrading comparisons of immigrants to ‘animals’ who ‘infest’ the country.”

While “these statements were not made specifically in relation to the citizenship question, they are nonetheless relevant to understanding the administration’s motivations,” the judge wrote. “And while the use of racial slurs, epithets, or other derogatory language does not alone prove discriminatory intent, it is evidence that official action may be motivated by such an unlawful purpose.”

The Justice Department had argued that the lawsuit by the plaintiffs — including the nonprofit labor-rights group La Union del Pueblo Entero — should be thrown out.

A number of lawsuits are arguing that the citizenship question will have a chilling effect on immigrants and keep them from participating in the census. The result would be to make the census inaccurate. It would also dilute immigrants’ political power because census data are used to draw electoral districts and determine how hundreds of billions of dollars in federal funds are allocated.

Commerce Secretary Wilbur Ross added the question earlier this year, saying the answer would help the Justice Department improve enforcement of the Voting Rights Act.