(Bloomberg) -- President Donald Trump’s most racially charged comments about immigrants were cited by a federal judge in allowing a lawsuit to proceed over a planned citizenship question for the 2020 census, in a case that’s similar to one already on trial in New York.

Plaintiffs including the nonprofit labor-rights group La Union del Pueblo Entero properly backed their claim that the decision to add the question to the once-a-decade survey for the first time in 70 years was motivated at least in part by discrimination, U.S. District Judge George Hazel said in a ruling Friday in Greenbelt, Maryland.

The judge cited Trump’s controversial Jan. 11 statement in which he described some immigrants of color as “these people from shithole countries” while praising those from nations like Norway. In denying the government’s request to throw out the lawsuit, he 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 said. “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 White House didn’t immediately respond to a request for comment.

Anti-Immigrant Views

Several lawsuits, including the one on trial in Manhattan, claim the citizenship question is intended to discourage immigrants and noncitizens from participating in the survey, even those who are in the U.S. legally. That, in turn, would dilute their political power, because census data are used to apportion members of Congress and divvy up the Electoral College.

Commerce Secretary Wilbur Ross, whose department oversees the Census Bureau, added the question in March, saying the citizenship data would help the Justice Department improve enforcement of the Voting Rights Act of 1965. The Justice Department asked him to add the question, he said.

Evidence uncovered since the dispute erupted shows Ross was actually approached about the question months earlier by Kansas Secretary of State Kris Kobach and that former White House chief strategist Stephen Bannon was also involved. Both men have espoused strong anti-immigration views.

In Friday’s ruling, Hazel denied the plaintiff’s request to depose Bannon and Kobach under oath.

“Even if Mr. Bannon was involved in high-level discussions regarding adding a citizenship question to the 2020 Census, the content of such communications is likely protected by the presidential communications privilege,” Hazel said.

--With assistance from Alyza Sebenius.

To contact the reporter on this story: Erik Larson in New York at elarson4@bloomberg.net

To contact the editors responsible for this story: David Glovin at dglovin@bloomberg.net, Elizabeth Wollman, Peter Blumberg

©2018 Bloomberg L.P.