Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

SAN FRANCISCO — The Trump administration's decision to add a citizenship question to the 2020 U.S. census "threatens the very foundation of our democratic system," a federal judge said Wednesday.

Judge Richard Seeborg said the commerce secretary's decision to add the question was arbitrary and capricious and would violate a constitutional requirement that the census count everyone in the country. Evidence showed the question would result a significant undercount of non-citizens and Latinos, the judge said.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Seeborg became the second judge to declare the move illegal, and 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.

An email to the U.S. Department of Justice seeking comment on the ruling was not immediately returned.

California and several cities in the state had sued over the citizenship question.

State attorneys argued that Commerce Secretary Wilbur Ross failed to consider that the question would cost California a substantial amount of money and at least one congressional seat by reducing the percentage of immigrants who respond to the survey, leading to an undercount.

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 will still be counted, Justice Department attorneys said in court documents.