Updated

A San Francisco-based district court judge in the Ninth Circuit on Wednesday ruled that the Trump administration's decision to add a citizenship question to the 2020 census "threatens the very foundation of our democratic system" because it would cause a significant undercount of immigrants and Latinos that could distort the distribution of congressional seats.

The ruling by Judge Richard Seeborg, which will head to the Ninth Circuit Court of Appeals if challenged by the government, said the Commerce secretary's decision to add the question was arbitrary and capricious and would violate a constitutional requirement that the census accurately count the U.S. population.

"The record in this case has clearly established that including the citizenship question on the 2020 census is fundamentally counterproductive to the goal of obtaining accurate citizenship data about the public," Seeborg said.

Seeborg became the second judge to declare the move illegal, so the effect of his decision is limited. A federal judge in New York had previously blocked the administration from adding the question to the population count that occurs every 10 years, and the U.S. Supreme Court last month agreed to review that decision.

Legal experts have said the Trump administration has a good chance of prevailing at the Supreme Court, where justices appointed by Republican presidents hold a 5-4 majority -- although Chief Justice John Roberts, who has repeatedly and publicly sought to present the court as nonpartisan, remains something of a wild card.

ROBERTS JOINS COURT'S LIBERAL WING IN KEY ABORTION VOTE, AMID HIS EFFORTS TO PRESENT SUPREME COURT AS NON-POLITICAL 

"There is no credible argument to be made that asking about citizenship subverts the Constitution and federal law," Chapman University law professor and constitutional law expert John Eastman told Fox News last year.

Responding to Wednesday's ruling, Eastman told Fox News: "Even though [Seeborg] acknowledges that a Citizenship question was part of the Census until 2000, he claims that current circumstances (i.e., the number of households with illegals) mean that restoring that question now would lead some people not to respond, therefore undermining the actual enumeration.  He also held that Secretary Ross’s decision to add the question back in violated the Administrative Procedures Act -- though I suspect Obama’s decision to remove it likewise did not go through the Administrative Procedures Act process.

"We’ll see if that ruling stands up on appeal when it gets to the Supreme Court," Eastman said. "It seems to me that this is another example of 'perfectly ok if other Presidents do it, but not this President.'"

Eastman added, "I do not believe it would be illegal or unconstitutional for Congress" to go a step further and explicitly "only count citizens" in the census.

"Indeed, I have argued in a brief filed in the Supreme Court that the 'excluding Indians not taxed' language in the [Constitution's] apportionment clause requires that only citizens be counted. 'Indians not taxed' was the example at the time of those who were not part of the body politic," Eastman said.

Some states have echoed Eastman's line of reasoning. Alabama Attorney General Steve Marshall, for example, asserted last year that predicted 2020 census numbers will cause Alabama to lose a congressional seat, and thus an electoral vote, to a state with a “larger illegal alien population.”

The ruling in California, however, found not only an Administrative Procedures Act violation, but also a constitutional problem with the Trump administration's actions -- and in that significant respect, it differed from the January decision by U.S. District Judge Jesse Furman. Furman also found the question violated administrative requirements, but he rejected an argument that it violated the Constitution.

Seeborg found a violation of the Constitution's Enumeration Clause, which could present another issue for the U.S. Supreme Court to consider. The clause states, "Representatives and direct Taxes shall be apportioned among the several States which may be included within this Union, according to their respective Numbers, which shall be determined by adding to the whole Number of free Persons, including those bound to Service for a Term of Years, and excluding Indians not taxed, three fifths of all other Persons."

"There is no credible argument to be made that asking about citizenship subverts the Constitution and federal law."

— Chapman University law professor John Eastman

The U.S. Department of Justice declined to comment.

The ruling came amid reports that the Census Bureau is quietly seeking comprehensive information about the legal status of millions of immigrants.

TRUMP: 'DISGRACEFUL' NINTH CIRCUIT WOULD OVERTURN MY THANKSGIVING TURKEY PARDON IF IT COULD

Under a proposed plan, the Department of Homeland Security would provide the Census Bureau with a broad swath of personal data about noncitizens, including their immigration status, raising concerns among privacy and civil rights activists.

Seeborg ruled in lawsuits by California and several cities in the state that asserted the citizenship question was politically motivated and should be kept off the census.

"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," state Attorney General Xavier Becerra said in a statement.

FILE - In this Nov. 27, 2018, file photo, Elizabeth OuYang, Coordinator of New York Counts 2020, speaks during a news conference outside the Thurgood Marshall United States Courthouse. The Trump administration says it will appeal directly to the Supreme Court to be allowed to include a citizenship question on the 2020 census, bypassing the court of appeals and seeking a final ruling by the end of June 2019. (AP Photo/Mary Altaffer, File)

California argued that the question would cost it a substantial amount of money and at least one congressional seat by reducing the percentage of Latinos and immigrants who respond to the survey. It said that would lead to an undercount in the state, which has a substantial number of people from both groups.

Census numbers are used to determine states' distribution of congressional seats and billions of dollars in federal funding.

The Justice Department had argued that census officials take steps such as making in-person follow-up visits to get an accurate count. Households that skip the citizenship question but otherwise fill out a substantial portion of the questionnaire would still be counted, Justice Department attorneys said in court documents.

The Trump administration announced last March it would include a citizenship question on the 2020 count, saying the Justice Department requested its inclusion to help with enforcement of voting rights laws. But documents released through a lawsuit show Commerce Secretary Wilbur Ross sought to include the question months earlier.

The move sparked an outcry from Democrats, who said it would disproportionately affect blue-tinted states. People were last asked whether they were U.S. citizens in the 1950 census.

CLICK TO GET THE FOX NEWS APP

Seeborg rejected the claim that the citizenship question stemmed from a request by the Justice Department, calling that a "pretext" for the real reason to add it.

He cited an email from Ross to a Commerce Department official nearly a year before the question was announced, in which Ross said he was "mystified" why nothing had been done in response to his "months-old request that we include the citizenship question."

"What ensued was a cynical search to find some reason, any reason, or an agency request to justify that preordained result," the judge said.

The Associated Press contributed to this report.