A federal judge in New York ruled Thursday that a lawsuit challenging the Trump administration’s decision to add a question asking about citizenship to the 2020 census could advance, saying the challengers had shown enough evidence that the decision could have been driven by discrimination to move the case forward.

While making it clear that the merits of the lawsuit would be decided in the future, U.S. District Judge Jesse Furman said the challengers had presented enough evidence for the cause to continue.

“Courts have a critical role to play in reviewing the conduct of the political branches to ensure that the census is conducted in a manner consistent with the Constitution and applicable law,” Furman, who was appointed to the bench by President Barack Obama, wrote in his ruling. “Assuming the truth of their allegations and drawing all reasonable inferences in their favor, the Court finds that NGO Plaintiffs plausibly allege that Secretary Ross’s decision to reinstate the citizenship question was motivated at least in part by discriminatory animus and will result in a discriminatory effect.”

Furman pointed to President Donald Trump’s harsh statements about immigrants, including one in which he said some come from “shithole countries,” as evidence the decision to add a citizenship question could have been motivated by “discriminatory animus.”

The ruling is a preliminary victory for the plaintiffs in the case, led by 18 states and a coalition of immigration rights groups who say the administration’s decision was “arbitrary” and “capricious,” violating federal law. They also say the decision was motivated by an intent to discriminate and drive down the census response rate among immigrant communities.

The Trump administration requested the case be dismissed, saying Commerce Secretary Wilbur Ross had broad discretion to decide what was on the census and there was no standard for the court to decide what was appropriate for the census. The decision is not discriminatory, the Trump administration says, because officials are making every effort to ensure that all persons are counted in 2020.

A Commerce Department spokesman said in a statement the agency was confident it would ultimately win the suit.

“The Department of Commerce is pleased the court found that Secretary Ross has broad authority over the Census,” the spokesman said. “We are confident that this includes the authority to reinstate a citizenship question and that Plaintiffs’ remaining claims will be dismissed after discovery shows that the Secretary lawfully exercised his discretion to do so.”

The case is being closely watched because civil rights groups are worried that adding the citizenship question will cause minority groups not to respond to the survey, which is only done once every 10 years. The data collected in the census is used to determine how many members of Congress each state gets and how hundreds of billions of dollars in federal funds are allocated.

“Today’s decision is a big win for New Yorkers and everyone across the country who cares about a fair and accurate Census,” said New York Attorney General Barbara Underwood (D), who is leading the coalition of state attorneys general in the lawsuit. “As we’ve argued, the Trump administration’s plan to demand citizenship status as part of the Census is unlawful – and it would potentially cause a huge undercount that would threaten billions in federal funds and New York’s fair representation in Congress and the Electoral College.”

While the case will continue, Furman tossed out one part of the plaintiffs’ complaint in which they alleged the addition of a citizenship question violated a constitutional provision that the government count “all persons.”

Furman also questioned the Commerce Department’s rationale for adding the citizenship question. Ross initially said that he began considering adding a citizenship question after the Justice Department requested it so it could better enforce the Voting Rights Act. But in a memo disclosed as part of the lawsuit, Ross said he actually began considering the possibility of adding a question months before the Justice Department’s request. Ross also disclosed it was the Commerce Department that asked DOJ to request a citizenship question. Documents made public this week show Ross was impatient to get a citizenship question on the census soon after he was confirmed and how a top Commerce Department official approached DOJ to get the agency to request adding the question.

“While Secretary Ross initially (and repeatedly) suggested that the Department of Justice’s request triggered his consideration of the issue, it now appears that the sequence of events was exactly opposite,” he wrote.

Furman also noted that the Voting Rights Act was passed in 1965 and the Justice Department has never said it needed better citizenship data to enforce the law.