The Trump administration’s plan to add a citizenship question to the 2020 census—which it estimated would decrease Hispanic participation in the census by five percent—has been temporarily shelved by the Supreme Court in a 5-4 decision.

The reason? The administration lied.

“Reasoned decisionmaking under the Administrative Procedure Act calls for an explanation for agency action,” Chief Justice Roberts wrote in the opinion for the Court. “What was provided here was more of a distraction.”

That is music to the ears of Trump’s critics. Finally, there is a limit to how much this administration can lie and get away with it.

Notably, the case was not a complete victory for opponents of the question. The Court held that a citizenship question is constitutional, and that Commerce Secretary Wilbur Ross, who is responsible for the census, was within his authority to set aside the dire warnings from the Census Bureau that the question would depress participation.

But it is a major victory nonetheless, for two reasons.

First, the citizenship question is unlikely to be on the 2020 census. The Court’s decision kicks the case back to the district court to continue investigations into the real reasons for the question—including deposing Secretary Ross himself.

That will take a while. In addition to the material already in the record—including numerous emails and memos clearly showing that Secretary Ross misrepresented the timeline and rationale for the question—still more material was recently unearthed on the hard drives of a deceased Republican operative, Thomas Hofeller, suggesting that citizenship data could be used to draw election districts to advantage “non-Hispanic whites.”

Evaluating all that information will take a long time.

Moreover, the ACLU and the New York Immigration Coalition had asked the district court to sanction government officials for lying in their statements to the court. That investigation, too, will now proceed.

It’s unclear exactly how long it takes to print 350 million census forms: at first the government said they’d have to start in June, then later they said October. The Census Bureau has said that they intend to start printing the forms next week. (The president said shortly after the court’s decision that he has asked lawyers to delay the census.) In any case, it is highly likely that this dispute will not be resolved in time for the citizenship question to be added.

The consequences are huge. Had the question been included, it would have intimidated some Hispanics from filling out the census for fear the information would be used by law enforcement for deportation.

That undercounting, in turn, would lead to fewer Democratic-leaning congressional districts; to under-apportioning money for areas with uncounted residents; and even to decreasing the electoral college representation of Hispanic-heavy states like Texas, California, and New York. It would make presidential elections like 2016—where Trump won the most electoral votes despite losing the popular vote—more likely.

“ ‘Incongruent’ is legalese for ‘lied.’ ”

And the data, we now know, would have been used to redraw congressional districts based on their number of citizens, rather than their total population, thus weakening the representation of areas with large numbers of immigrants and people of color.

All that is on hold for now, and probably off the table for 2020.

The second reason today’s decision is a victory has to do with the Court’s reasoning: that, in Roberts’s words, “we are presented…with an explanation for agency action that is incongruent with what the record reveals about the agency’s priorities and decisionmaking process.”

“Incongruent” is legalese for “lied.” The Trump administration said one thing, but the evidence showed another.

Specifically, wrote Roberts, “that evidence showed that the Secretary was determined to reinstate a citizenship question from the time he entered office…and adopted the Voting Rights Act rationale late in the process.”

This “reveal[s] a significant mismatch between the decision the Secretary made and the rationale he provided.”

“This is a victory for the rule of law,” said Dale Ho, the ACLU lawyer who argued the case at the Supreme Court. “You can’t have government accountability unless government agencies are open and honest about their reasons for taking the actions they take.”

There was good reason to doubt that Roberts, in particular, would decide the case this way. Just last year, he took the Trump administration at its word that the so-called “Travel Ban,” which began, obviously, as a ban against Muslims entering the United States, was in fact a religion-neutral travel ban put in place for national-security reasons.

There, too, the government came up with a bunch of evidence supporting their decision. There, too, they asked the Court to ignore the mountain of evidence that the rationale was pretext.

But there, Roberts went along with it.

And indeed, in today’s decision, Justices Thomas, Gorsuch, and Kavanaugh note that the Court seems to be contradicting itself. Sometimes it takes the government at its word, sometimes it says that word is pretext. Admittedly, they have a point.

But, Roberts seemed to say, there is a limit to how much BS the Court will take. When there are email chains, memos, and meeting notes that directly contradict what government officials are saying, then at the very least, courts will fully inquire into the administrative record.

Or, in his more delicate words:

“Agencies [must] offer genuine justifications for important decisions, reasons that can be scrutinized by courts and the interested public. Accepting contrived reasons would defeat the purpose of the enterprise. If judicial review is to be more than an empty ritual, it must demand something better than the explanation offered for the action taken in this case.”

At last, truth has had its day in court.