In an embarrassing defeat for Donald Trump and Commerce Secretary Wilbur Ross, a federal judge today issued a 277-page opinion ordering the removal of a question about citizenship from the 2020 census.

The question is controversial because, as the Trump administration admitted, it would discourage undocumented immigrants and their families from answering the census. That, in turn, would lead to slanted political districts and budget allocations, both of which are based on total population, not the number of citizens.

Judge Jesse Furman of the Southern District of New York issued a blistering, lengthy opinion that blasted both the question itself and the illegal process by which it was added to the census. He found that Ross had lied about the reasons for the change, failed to follow the law on making it, and illegally ignored the opinion of the Census Bureau itself, which urged him against it.

One part of the current lawsuit has already been appealed to the Supreme Court: whether Ross himself can be forced to give a deposition. (As Judge Furman noted, the government has tried 14 times to stop the litigation from happening altogether.) Now, the rest of the case certainly will be appealed as well – but with a factual and legal record so comprehensive, it is difficult to see how the government can prevail.

The Census is mandated by the Constitution, and the Census Bureau – part of the Department of Commerce – is charged with counting every person, citizen and non-citizen alike, living in the United States. While respondents were asked about citizenship from 1820 to 1950, by 1960 the Census Bureau had concluded that the question led to an inaccurate count of how many people resided in the U.S., and it was dropped.

Then, suddenly, in March 2018, Ross announced he was bringing it back. This was against the advice of nearly every expert on the census, who all agreed it would deter some/many Latinos from answering the census for fear of exposing themselves or family members to deportation or investigation.

Ross testified under oath that the Department of Justice asked him to make the change in a December 2017 letter, so that they could better enforce the Voting Rights Act. But this was a lie. Actually, email records showed, Ross asked for that letter himself, and the change actually came out of Spring 2017 meetings with White House advisors Steve Bannon and Kris Kobach, both of whom were part of the nationalist wing of Trump’s inner circle. (For good measure, Ross also lied under oath about meeting them too.)

In other words, the “unintended effects” of the citizenship question were the actual intention.

Probably, anyway. Actually, today’s opinion was a split decision. Judge Furman found that Secretary Ross had egregiously violated the Administrative Procedure Act (APA), by flouting several standards of regulatory rulemaking. But he did not find that the citizenship question was itself discriminatory.

That decision makes sense. Without Ross’s deposition, there are still too many gaps in the record. We know, as Judge Furman exhaustively detailed for 50 pages, that the question was not put in for the reasons Ross originally stated. That alone is enough to strike it down.

Judge Furman also detailed, in 40 more pages of meticulous analysis, that the citizenship question would have a disproportionate impact on the families of (legal and illegal) immigrants, primarily Latinos.

But there was insufficient evidence to prove that that impact was Ross’s true motivation: no smoking-gun email from Kobach to Ross saying “let’s undercount the Mexicans,” no transcript of the meeting with Bannon. And so perhaps the central question of the case – why Ross made the decision he made – remains unanswered.

But the questions that are answered are more than sufficient to strike the question from the census.

“In arriving at his decision as he did,” wrote Judge Furman, “Secretary Ross violated the law. And in doing so with respect to the census… [he] violated the public trust.”

For good measure, it appears that Ross also committed perjury, though that issue was not part of the lawsuit.

As of today, the citizenship question is no longer part of the census. Judge Furman’s decision will surely be appealed, however, and will likely go to the Supreme Court, which is already wrestling with the questions of whether Ross may be deposed or not.

But there are two reasons to believe that Judge Furman’s decision will likely stay in place.

First is the decision itself. Judge Furman noted that “with time so short [before the 2020 census] and the likelihood that one or both sides will seek appellate relief so high, it is critical to make a comprehensive record in order to facilitate higher court review.”

And that he did, reaching numerous issues that might ordinarily not be necessary for his holding; reciting dozens of pages of factual findings; and, crucially, relying only on the administrative record in the case, not additional materials that may or may not be admissible, depending on how the appeals go. By armoring his opinion in this way, Judge Furman has rendered it less vulnerable to appeal.

Second is the Supreme Court. Though Justices Gorsuch and Kavanaugh both tilt far to the right ideologically, neither is a fan of broad administrative power. In this case, the Secretary of Commerce simply ignored the legal constraints on his power and did what he (or Bannon/Kobach) wanted for political reasons.

That is not the limited-government conservatism that Justices Gorsuch and Kavanaugh have espoused in their judicial opinions. While it’s always possible that the Court’s conservatives will vote ideology over principle – see Bush v. Gore – certainly their particular judicial philosophies do not bode well for the Trump administration’s brazen defiance of administrative law.

Weaponizing the census may pale in comparison to Russian collusion, the government shutdown, or the Trump administration’s immigration policies. But it is part of the same nationalist campaign, and today, it suffered a fatal blow.