A federal court on Wednesday banned the from asking about citizenship on the 2020 census, saying even including the question at this point would threaten the foundations of American democracy.

Judge ’s ruling is the second to ding the over the citizenship question. But where a court in New York gave the a chance at a do-over, Judge said there can’t be “another bite at the apple.”

He issued an outright ban on including the citizenship question in the 2020 count.

“The inclusion of the citizenship question on the 2020 Census threatens the very foundation of our democratic system — and does so based on a self-defeating rationale,” wrote the Obama appointee, who sits on the U.S. District Court for the Northern District of California.

The matter is not likely to end there.

The Supreme Court has already said it would hear the government’s appeal of the case out of New York, speeding oral arguments onto the calendar April 23 and setting up a final decision by this summer.

But that case only dealt with whether the broke procedural law.

Judge ’s 126-page opinion adds new legal heft to the case against the , saying that asking the question at this point would subvert the Constitution’s demand for an accurate decennial census.

The ruling is a significant blow to President Trump, whose campaign has touted inclusion of the citizenship question as a major accomplishment.

It’s also a victory for California Attorney General Xavier Becerra, one of those who sued to block the question. He has now defeated the in court on several major tests, including sanctuary cities.

“Justice has prevailed for each and every Californian who should raise their hands to be counted in the 2020 Census without being discouraged by a citizenship question,” Mr. Becerra said.

Commerce Secretary Wilbur Ross announced a year ago that he had decided to have the 2020 count ask people to reveal their citizenship. He said the Justice Department had asked for the question, saying the data would be helpful in figuring out voting-rights matters.

But Judge said that was a pretext. He concluded Mr. Ross had already decided he wanted to ask about citizenship, then sought a justification.

That, he said, violated procedural laws that govern how agencies make decisions.

Even beyond that, though, the judge concluded that asking about citizenship at this point would scare some people away from participating — noncitizens and Hispanics in particular — thus making the count less accurate.

He said that violates the Constitution’s clause requiring an “actual enumeration” of the population every 10 years.

Citizenship questions have been asked before. Up until 1950, the question was part of the basic form all households got.

After that, the question was relegated to the “long form” that went to a smaller number of households, and it’s still to this day asked on the ’s American Community Survey, which is a rolling version of the census long form.

But Judge said it doesn’t matter what happened in the past, or what might work in the future. What matters is that in today’s environment people might refuse to answer.

“This is not to say that the may never ask about citizenship on future census questionnaires,” he wrote. “It simply means that, where the inclusion of a particular question will degrade the accuracy of the Census to the point where the proper apportionment of representatives among the states is at risk, the government must identify a legitimate governmental purpose that is sufficiently weighty to justify this significant harm to the census.”

The had said people who didn’t want to answer about citizenship could just leave the question blank.

Critics though said people would be scared to answer any of the questions. They said that would skew the count, distorting the drawing of congressional districts and disbursement of tens of billions of dollars in government assistance, both of which are based on the data.

The census does ask other demographic questions such as race and sex. Judge said those questions are still valid because there’s no evidence they would distort the count.