On Thursday, U.S. District Judge Jesse Furman rejected the government’s efforts to dismiss a lawsuit challenging the addition of a citizenship question to the 2020 census, ruling that the Trump administration may have added that question illegally.

Secretary of Commerce Wilbur Ross announced in March that a citizenship question would be included on the upcoming census. He asserted that the question, which has not been on the decennial census since 1950, was requested by the Department of Justice so that the agency could maintain a “reliable calculation of the citizen voting-age population” to enforce the Voting Rights Act. This highly dubious rationale never made any sense, and a group of state attorneys general—along with advocacy groups like the American Civil Liberties Union—sued to block the inclusion of the question. In July, Furman allowed discovery in the case to proceed, declaring that the plaintiffs had made a substantial showing of bad faith on the part of the government.

Now Furman has formally denied the Justice Department’s motion to dismiss key constitutional questions in a ruling that casts further doubt on the legality of the administration’s actions. Furman found that, while the government theoretically has authority to ask about respondents’ citizenship status, it may not insert the question out of discriminatory intent. And here, even at this early stage in litigation, the plaintiffs have put forth persuasive evidence that the citizenship question has a discriminatory purpose.

Furman wrote that it is entirely “plausible” that the Trump administration added the citizenship question to discriminate against immigrants and minorities by provoking a major “undercount” of their communities. This undercount would deprive these communities (and the states in which they’re located) of vital federal funds, as well as representation in Congress and the Electoral College. Thus, the lawsuit may move forward, and plaintiffs may continue deposing administration officials and procuring evidence of their allegedly unlawful actions.

In adding the citizenship question to the census, the judge wrote, the government departed “from the normal procedural sequence” in a number of alarming ways. “These departures include overruling career staff who strongly objected to including the citizenship question,” he explained, “failing to extensively test reintroduction of the question, and ignoring the recommendation of the Census Bureau’s advisory committee.” Every expert believed the question would be “very costly” while harming “the quality of the census count”—yet Ross overruled their objections.

Even worse, the “specific sequence of events leading up to” the insertion of the citizenship question indicates that Ross’ “sole proffered rationale … may have been pretextual.” Ross “initially (and repeatedly) suggested that the Department of Justice’s request triggered his consideration of the issue.” Yet “it now appears that the sequence of events was exactly opposite”: Ross pushed the Justice Department to make the request, then cited its letter to justify the addition of the question. This dissembling, pretextual process “spark[s] suspicion” of discriminatory intent “at a minimum.”

President Donald Trump’s comments, Furman added, only bolster the impression that racial animus lay behind the administration’s decision. As the government prepared the question, Trump complained of immigrants “from shithole countries” coming to the United States, and that certain immigrants “turn out to be horrendous.” (“They’re not giving us their best people, folks.”) It was Ross, Furman conceded, who made the formal decision to add the question, not Trump. But since then, Trump has implied that he was “personally involved in the decision.” For instance, his own re-election campaign asserted in an email that the president “officially mandated” it. All of this evidence, Furman concluded, evinces racial animus in violation of the Fifth Amendment’s due process and equal protection guarantees.

Furman’s ruling is a major victory for the coalition that sued to keep the citizenship question off the 2020 census. But perhaps the most important aspect of the decision is buried in two footnotes. The plaintiffs argued that the question’s addition violated both the Constitution and the Administrative Procedure Act, which bars “arbitrary and capricious” actions by federal agencies. Earlier this month, Furman declared from the bench that the plaintiffs were entitled to discovery on their APA claim. In Thursday’s decision, he affirmed and expanded upon this holding. Given the “evidence of pretext” here, Furman wrote, the plaintiffs have clearly stated a plausible claim that the government ran afoul of the APA. Indeed, even if their constitutional arguments ultimately fail, Furman noted, this pretext “may well suffice to prove a violation of the APA.”

As discovery proceeds, then, the Trump administration will be boxed in on every side. Plaintiffs will continue to gather evidence that the citizenship question was added in bad faith. They’ve already proved that Ross lied about the real reason for the addition. And even if they cannot prove racial animus, they seem overwhelmingly likely to prevail on their APA claim that the question’s inclusion is “arbitrary and capricious.” If the administration wishes to save itself from further embarrassment, it should drop the question altogether, rather than risk revealing in court just how badly it failed to cover its tracks.