President Trump conceded defeat on the census citizenship question on Thursday, just nine days after declaring that he would continue the fight.

But for Attorney General William P. Barr, it was an opportunity to congratulate Trump.

“Thank you, Mr. President, and congratulations on today’s executive order,” Barr began, apparently casting Trump’s unilateral action, for which he needed no approval and which would attempt to get citizenship data by some other means, as a proud moment. Barr concluded: “Congratulations again, Mr. President, on taking this effective action.”

The idea that Barr would try to put a good spin on this isn’t altogether surprising. It was the Justice Department he now runs, after all, that lost in the Supreme Court two weeks ago.

But the degree of the spin is another matter. Barr has been criticized for his portrayal of the Mueller report — including, gently, by Robert S. Mueller III himself. He has also offered slanted, pro-Trump comments about how the Russia investigation was launched in the first place. Those are more problematic, given he’s supposed to be somewhat independent on matters involving potential criminality by the president.

But just for sheer spin value, Thursday’s performance was tough to match. Let’s run through it.

“As the Supreme Court recognized, it would be perfectly lawful for the federal government to ask on the census whether individuals are citizens of the United States.” And: “But while the Supreme Court correctly recognized that it would be entirely appropriate to include citizenship questions on the census ...”

This isn’t what the Supreme Court said. It said that the commerce secretary has “broad authority” over the census but that the law does “not leave his discretion unbounded.” It also did not shut the door on the government putting a citizenship question on the census — it simply said its justification was “contrived” — but it didn’t say it would definitely be “perfectly lawful” to include it.

“Therefore, there is no question that a new decision to add the question would ultimately survive legal review.”

Again, Barr is claiming an inevitable victory that the Supreme Court hardly guaranteed. It’s logical that, if this case was fought in perpetuity, it would eventually succeed. But that assumes there is some justification that would pass muster with the justices. They seemed to leave the door open to that, but there are no guarantees.

“One other point on this: Some in the media have been suggesting, in the hysterical mode of the day, that the administration has been planning to add the citizenship question to the census by executive fiat without regard to contrary court orders or what the Supreme Court might say. This has been based on rank speculation and nothing more. As should be obvious . . . this has never been under consideration.”

This is utterly ridiculous. Trump himself said this was under consideration. Here’s an exchange last week:

Q: Are you going to issue an executive order on the census?
TRUMP: We’re thinking about doing that. It’s one of the ways; we have four or five ways we can do it. It’s one of the ways that we’re thinking about doing it very seriously. We’re doing well on the census.

And in case there is any doubt Trump was talking about putting the citizenship question on the census — and not the kind of executive order he did Thursday — here’s what else he said: “We could also add an addition on so we can start the printing [of the census] now and maybe do an addendum after we get a positive decision. So we’re working on a lot things, including an executive order.”

“Turning to today, I applaud the president for recognizing in his executive order that including a question on the census is not the only way to obtain this vital information.”

People around Trump have been making this case to him for a while. He still opted to say he would pursue the census after the loss in the Supreme Court. This is a fallback, plain and simple. And there is no guarantee that other, non-census data will be useful for things some Republicans desired it for.

Speaking of which ...

“That information will be used for countless purposes, as the president explained in his remarks today. For example, there is a current dispute over whether illegal aliens can be included for apportionment purposes. Depending on the resolution of that dispute, this data may be relevant to those considerations. We will be studying this issue.”

This isn’t so much spin as it is a remarkable inclusion. The Supreme Court has indeed left open the possibility that congressional districts could or should be apportioned according to the voting-eligible population and not total population.

But the administration and its lawyers have demurred when opponents argued the census citizenship question was a thinly veiled effort to get the data to do this (which would benefit Republicans). The fact that Barr is now mentioning this as a potential goal when it comes to getting citizenship data kind of gives away the game — in case Trump hadn’t already.