The city and county of Los Angeles and several other major California cities have joined the state’s lawsuit opposing the federal government’s addition of a citizenship question on the 2020 U.S. Census.

California Attorney General Xavier Becerra filed the lawsuit in March while arguing that the question could lead many immigrants not to respond to the Census out of fear it could be used to identify them or their relatives for deportation if they are in the country illegally. The cities of Stockton, Fremont, Long Beach and Oakland have also joined the lawsuit.

“We know that if you’re not counted, you don’t count. We are here to say that all Californians count,’’ Becerra said during a recent news conference outside Los Angeles City Hall with Mayor Eric Garcetti, City Attorney Mike Feuer, County Supervisor Hilda Solis and Stockton Mayor Michael Tubbs.

An estimated 3.5 million immigrants live in the county of Los Angeles, and roughly $400 billion in federal funding for education, public health, transportation and other critical functions are allocated on the basis of the census data, as are congressional seats.

“By including a citizenship question, which will diminish response rates, the census will not be able to fulfill its constitutional obligation to count everyone,’’ Becerra said.

White House Press Secretary Sarah Huckabee Sanders said the question was for the government to better enforce the Voting Rights Act and “necessary for the Department of Justice to protect voters,’’ according to The New York Times.

“It is going to … provide information that allows us to comply with our own laws and with our own procedures,’’ she said in March.

Becerra’s lawsuit alleges that the question would violate Article I, Section 2 of the Constitution, which requires the “actual enumeration’’ of all people in each state every 10 years, and the Administrative Procedure Act’s prohibition against “arbitrary and capricious’’ agency action.

“Here in Los Angeles, we need to assure that the count is accurate, and I want to underscore the point — every member of our community in Los Angeles stands to suffer if there is an undercount,’’ Feuer said. “All of Los Angeles stands to benefit from funds that are allocated based on an accurate count of our population.’’