Chief Justice Roberts countered that his majority opinion was a modest one that recognized the limits of judicial power.

“No one can accuse this court of having a crabbed view of the reach of its competence,” he wrote. “But we have no commission to allocate political power and influence in the absence of a constitutional directive or legal standards to guide us in the exercise of such authority.”

Thursday’s second major ruling, on the census, may turn out to be less consequential. But it was nonetheless a striking setback for the Trump administration. Since 1950, the government has not included a question about citizenship in the forms sent to each household, but the administration was confident it would prevail before a court it views as generally sympathetic to its assertions of executive power.

But court rejected the administration’s stated reason for adding a question on citizenship to the census, leaving in doubt whether the question would appear on the forms sent to every household in the nation next year.

Chief Justice Roberts, writing for the majority, said the administration’s explanation for adding the question “seems to have been contrived.” But he left open the possibility that it could provide an adequate answer.

Executive branch officials must “offer genuine justifications for important decisions, reasons that can be scrutinized by courts and the interested public,” the chief justice wrote. “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.”

The practical effect of the decision was not immediately clear. While the question is banned for now, it is at least possible that the administration will be able to offer adequate justifications for it. But time is short, as the census forms must be printed soon.