WASHINGTON — The Trump administration’s decision to ask people about their citizenship in the 2020 census set off worries among Democrats that immigrants will dodge the survey altogether, diluting political representation for states that tend to vote Democratic and robbing many communities of federal dollars.

Not since 1950 has the census collected citizenship data from the whole population, rather than just a population sample, says the Congressional Research Service. The decision to restore the question after decades prompted an immediate lawsuit from California — already tangling with Washington over immigration — and moves by other states with large immigrant populations to engage in a legal fight.

The population count, a massive effort taken every 10 years, is far more than an academic exercise. It’s required by the Constitution and used to determine the number of seats each state has in the House as well as how federal money is distributed to local communities. Communities and businesses depend on it in deciding where to build schools, hospitals, grocery stores and more.

The political stakes of undercounting segments of the population are high.

Critics of the census decision seemed far more focused on the potential for intimidation and an inaccurate count than the prospect that the info could be used to target participants for deportation.

Several states that have slowing population growth or high numbers of immigrants such as California, New York, Illinois, Massachusetts and Ohio are typically at risk of losing U.S. House seats when their congressional districts are redrawn every 10 years — depending on how fully their residents are counted.

California struck quickly, with Attorney General Xavier Becerra filing a federal lawsuit Tuesday that seeks to block Commerce Secretary Wilbur Ross’ decision to add a citizenship question in 2020. Officials from New York and New Jersey, also Democratic-led states, were also planning on leading or participating in lawsuits. Massachusetts signaled interest, too.

“The census constitutes the backbone for planning how and where our communities will invest taxpayer dollars,” Becerra said. “California simply has too much to lose to allow the Trump Administration to botch this important decennial obligation.

The Justice Department said in a statement it “looks forward to defending the reinstatement of the citizenship question, which will allow the department to protect the right to vote and ensure free and fair elections for all Americans.” The Commerce Department said the benefits of obtaining citizenship information “outweighed the limited potential adverse impacts.”

Their argument in essence: Enforcing voting rights requires more data on the voting-age population of citizens than current surveys are providing.

Democratic lawmakers had been bracing for the decision. A bill sponsored by Rep. Carolyn Maloney, D-N.Y. would block the addition of a citizenship question, or any major design change, unless it has undergone a certain level of research and testing, but it faces dim prospects with no Republicans signing on.

House Democratic leader Nancy Pelosi said Tuesday that adding such a question “will inject fear and distrust into vulnerable communities and cause traditionally undercounted communities to be even further under-represented, financially excluded and left behind.”

Some Republican lawmakers hailed the decision on Tuesday. GOP Sens. Jim Inhofe of Oklahoma, Tom Cotton of Arkansas and Ted Cruz of Texas had sent a letter to the Commerce Department asking Ross to add the question.

“It is imperative that the data gathered in the census is reliable, given the wide ranging impacts it will have on U.S. policy,” Cruz said in a press release issued by the three lawmakers. “A question on citizenship is a reasonable, commonsense addition to the census.”

The Census Bureau separately conducts an ongoing survey called the American Community Survey that provides citizenship data on a yearly basis. But it only samples a small portion of the population.

Before that, citizenship or related questions were asked of about 1 in 6 households on the census “long form,” which has since been retired. The Congressional Research Service said it has been 1950 since all households were asked about citizenship.

Alabama Attorney General Steven Marshall said the American Community Survey is so small, with a correspondingly large margin of error, that it is an ineffective tool for understanding lightly populated rural areas of the country.

“It just makes sense that government has a more accurate record for the census and reinstates the practice of including a citizenship question in the next census,” Marshall said.

A joint fundraising committee for Trump’s re-election campaign and the Republican National Committee highlighted the addition of a citizenship question in a fundraising pitch last week. The pitch said Trump wants the 2020 Census to ask people whether or not they are citizens, and that in another era, this would be common sense.

“The President wants to know if you’re on his side,” the solicitation asks.

Census counts are taken by mail and by workers walking neighborhoods. The Census Bureau says the 2010 census drew a massive response, with about 74 percent of the households mailing in forms and remaining households counted by workers in neighborhoods.

Information is only released publicly in the aggregate, although the government has the details. In 2010, the Obama administration offered assurances that the census data would not be used for immigration enforcement.

The Census Bureau states on its website that personal information obtained through its surveys cannot be used against respondents by any government agency or court. And the disclosure by an employee of any information that would personally identify a respondent or family can lead to up to five years in prison or a fine of $250,000, or both.

Critics of the decision seemed far more focused Tuesday on the potential for intimidation and an inaccurate count than the prospect that the information could be used to target participants for deportation.

“I can only see one purpose for why this question is being added,” said Arturo Vargas, executive director of the National Association of Latino Elected and Appointed Officials Educational Fund, an organization that seeks to advance Latino political engagement. It’s to “scare Latinos and others from participating in the 2020 Census.”

Associated Press writer Amanda Lee Myers contributed to this report from Los Angeles.