A divided Supreme Court last week blocked Commerce Secretary Wilbur Ross from adding an untested citizenship question to the 2020 census. The Court’s ruling is a victory for representative democracy over the Trump administration’s latest power play, which would have led to a dramatic undercount of the country’s noncitizen population, with substantial implications for federal funding and political representation. In the process of reaching the right outcome, however, the Court has rewritten history, with justices up and down the bench joining together to create an atmosphere of normalcy around a question that is anything but.

Coming into the Supreme Court after a series of decisive trial-court defeats, Donald Trump’s administration really had only two defenses for the citizenship question: first, that it would help the Justice Department enforce the Voting Rights Act on behalf of minority communities; and second, that the administration was simply “reinstating” a question that had a deep “pedigree” stretching back “nearly 200 years.”

The Court rejected the Voting Rights Act defense as a pretext. That was all the challengers needed legally, since the law governing federal-agency decision making requires the stated reason for an agency’s action to be the real reason. But the Court accepted much of the administration’s historical argument—which is wrong, as we explained in a law-review article based on research into centuries-old census instructions, mid-century statistical texts, and decades of congressional proceedings.

Most significant, Chief Justice John Roberts’s majority opinion and the partial concurrences are littered with assertions that the Trump administration was trying to “reinstate” the citizenship question. Even justices who were otherwise skeptical of the administration’s scheme and seemed to have a better grip on the historical record—Justices Stephen Breyer, Ruth Bader Ginsburg, Elena Kagan, and Sonia Sotomayor—referred repeatedly to “reinstatement.” That word obscures the nature of what the administration was trying to do.

Never in the 230-year history of the census has the complete-count questionnaire (or its equivalent) asked for the citizenship status of everyone in the country, as Ross proposed. When citizenship was asked at all, it was directed to small segments of the population, such as foreign-born men 21 or older (1890 to 1910) or foreign-born people (1930 to 1950), mainly to figure out how well they were assimilating into the United States. After the 1950 census, questions about citizenship or naturalization were confined to sample surveys that went to only a small percentage of households.

The Court acknowledged the change in census practice after 1950, but it mangled the details of the practice leading up to that point, incorrectly treating questions about “birthplace” and “citizenship” as equivalent and asserting that “between 1820 and 1950, the question was asked of all households.” The fact is that multiple censuses during that period had no citizenship question (1840, 1850, 1860, and 1880), and—as mentioned—those that did include one did not direct it at every person in a household. These various errors allowed the Court to ignore the ultimate conclusion it should have drawn from the history: The Trump administration’s gambit was unprecedented, not a return to form.

The majority opinion also soft-pedaled the Census Bureau’s decision to remove all citizenship and naturalization questions from the decennial census following the 1950 count. It is true, as the Court claims, that the bureau concluded that citizenship information had declined in importance to the government, researchers, and other users of census data by this time. But the bureau didn’t just get rid of questions that were unimportant—it overhauled its whole approach, because traditional practices were deficient in accomplishing the one thing the Constitution’s enumeration clause requires the government to do: count everyone in the country.

Traditionally, the federal government tried to do two things at once with the census: count all heads and collect other useful information. By the 1950s, the Census Bureau’s social-science skills had evolved sufficiently that it could evaluate how well it was doing its job, and it found that the second ambition was impeding the first; the count was missing millions while wasting resources. So the bureau stripped out extraneous questions from the main survey, including dozens of other “demographic questions,” as the Court called them. Census Director Robert W. Burgess explained the benefits of these changes to Congress in the lead-up to the 1960 census: “For a long time, the Census Bureau has believed that enumerators were being burdened with more instructions and work than they could effectively handle, with the result that both coverage and content suffered.”

The majority similarly understated the Census Bureau’s resistance to proposals in the 1970s and ’80s that would have required it to assess everyone’s citizenship status. According to the Court, the bureau was concerned that such efforts “would discourage noncitizens from responding to the census,” and, in the words of a 1980 district-court opinion characterizing the bureau’s position, that those efforts would “inevitably jeopardize the overall accuracy of the population count.” During this period, Census Bureau Director Vincent Barabba warned that the “census is just not designed for” asking everyone’s citizenship status, and that doing so would erode “the credibility of the Bureau, and, more importantly, the credibility and public confidence in—and, indeed, the accuracy of—the figures embodied in the final census results.” Similarly, the bureau warned—in language from the 1980 case omitted by the Court last week—that “questions as to citizenship are particularly sensitive in minority communities and would inevitably trigger hostility, resentment, and refusal to cooperate.” The concern during this period, then, wasn’t some unspecified loss of accuracy due to “discouragement”; it was a full collapse of the census and everything it stands for, driven by widespread fear of, and anger toward, the government.

In his partial concurrence, Breyer supplied some of this crucial context, but a majority made up of Roberts and Justices Clarence Thomas, Samuel Alito, Neil Gorsuch, and Brett Kavanaugh overlooked it in ruling that the administration’s decision didn’t violate the Constitution’s enumeration clause. They asserted that citizenship questions have been “open, widespread, and unchallenged since the early days of the Republic.” This is preposterous. If “history matters”—as the conservative majority asserts—it must matter that Ross proposed to do something that has, in fact, never been done before. And it must matter that, for the past 70 years, the Census Bureau—the agency primarily charged with counting everyone—believed that citizenship questions and a whole host of other demographic questions didn’t belong on the decennial headcount, because they made it impossible to … count everyone. The Court thus sent the message that a citizenship question on the decennial census would be normal. The Court blocked the question because Ross lied about why he wanted it; but if he hadn’t lied, it would have been fine.

For more than a year now, the simple prospect of a citizenship question on the 2020 census has elevated vulnerable communities’ fears of the federal government. The Supreme Court’s ruling should help mitigate those fears somewhat. But the Court could have and should have taken a far stronger posture than it did, ruling not that the citizenship question was administratively imperfect, but that it was unconstitutional and un-American.