A federal judge in New York ruled that President Donald Trump’s administration must abandon its plans to include a controversial citizenship question as part of the 2020 census.

The question — ”Is this person a citizen of the United States?” — has not been asked as part of the census since 1950. But in March of last year, Commerce Secretary Wilbur Ross announced that the question would be added back into the census. More than two dozen cities and states sued.

On Tuesday, U.S. District Judge Jesse Furman determined that the decision to include the question about citizenship violated the Administrative Procedure Act, which ensures that federal agencies consider “all important aspects of a problem” before establishing new regulations.

“In arriving at a decision as he did, Secretary Ross violated the law,” Furman’s ruling said. “And in doing so with respect to the census — ’one of the most critical constitutional functions our Federal Government performs’ and a ‘mainstay of our democracy’ — Secretary Ross violated the public trust.”

Census Bureau research indicates that the inclusion of the question could lead to an inaccurate headcount because U.S. households with noncitizens may be wary to participate in the 2020 census under the current anti-immigration rhetoric espoused by U.S. President Donald Trump. The plaintiffs who brought the lawsuit against the Trump administration’s inclusion of the question argue that it discriminates against immigrants of color.

The Trump administration is expected to appeal the decision to the 2nd Circuit Court of Appeals, and the case could ultimately makes its way to the conservative-majority Supreme Court.

The plaintiffs in the lawsuit Furman ruled on are the state of New York and the New York Immigration Coalition. Another trial over the question is happening in California, and an additional case is set to begin in Maryland later this month.