A federal judge has struck down a decision by the Trump administration to add a question about citizenship to the 2020 U.S. Census, setting up what's expected to be a drawn-out appeal process from the U.S. Department of Justice.

U.S. District Judge Jesse Furman of the Southern District of New York said in the decision that Commerce Secretary Wilbur Ross violated the Administrative Procedure Act while deciding to add the citizenship question to the survey over the first year and a half of the Trump administration.

Furman said the plaintiffs in the case—a group of states and immigrant rights groups—had proven throughout the case that they would be harmed in various ways as a result of the question being added to the census.