A coalition of civil rights groups, cities, counties and other entities has sued the Trump administration over its shifting of the deadline for the 2020 Census, saying the change was politically motivated and will harm the accuracy of the count.

The lawsuit, filed Tuesday in the U.S. District Court for the Northern District of California, says the administration’s decision this month to stop collecting data on Sept. 30 rather than Oct. 31 is connected to the president’s recent directive to exclude undocumented immigrants from being counted for apportionment of House seats — an order that sparked its own flurry of lawsuits.

The suit, whose plaintiffs include the National Urban League, the Black Alliance for Just Immigration, the League of Women Voters and jurisdictions in Texas, Washington state and California, says moving up the date will result in an undercount of minority communities and is intended to help enable the president’s July 21 directive.

“To increase the chance that the President can fully effectuate the apportionment exclusion order, he must receive the population totals while he is still in office,” says the lawsuit, which names as defendants the Commerce Department, the Census Bureau, Commerce Secretary Wilbur Ross and Census Bureau Director Steven Dillingham.

Noting that the new timeline “cuts a crucial four weeks from the actual count and four months from the time for processing and reporting the data,” the lawsuit seeks to have the court declare the plan unlawful. It says it violates the Constitution’s enumeration clause and the 14th Amendment, as well as the Administrative Procedure Act, which challengers used to block the Trump administration’s attempt to add a citizenship question to the count.

Thomas Wolf, senior counsel at the Brennan Center for Justice, which is representing the plaintiffs, called the new timeline “capricious” and said the administration had given no reason for needing it.

“We had a plan, the bureau was operating by it, and then suddenly the bureau is rushing to meet an arbitrary deadline that the bureau has already said it can’t meet,” Wolf said. “That’s not the way a transparent and democratic government is supposed to function.”

The Commerce Department did not immediately respond to questions about the suit.

The lawsuit is the latest move in a complex tug of war between the administration, lawmakers and civil rights groups over the census timeline. In April, the Census Bureau, which is overseen by the Commerce Department, said that because of coronavirus-related restrictions it could not conduct an accurate count on its original schedule, which would have meant finishing the count by July 31 and delivering data to be used for congressional apportionment by Dec. 31. Census data is also used for redistricting and the disbursement of federal funding.

The bureau announced a new plan to finish the count on Oct. 31 and asked Congress to approve a four-month delay of the delivery date, to April 30, 2021. The House passed a coronavirus relief package that approved the delay, but a draft of a Senate relief bill has not included a similar approval.

Senior census officials said last month that the window to deliver the data by Dec. 31 had already passed. But on Aug. 3, the government announced the Sept. 30 deadline for data collection and said it would adhere to the December deadline for delivery.

A letter last week from 48 senators, including two Republicans from Alaska, urged Senate leaders to include the deadline extension in the relief bill. On Thursday, Rep. Carolyn B. Maloney (D-N.Y.), the chair of the House Oversight Committee, threatened to subpoena Census Bureau officials if they did not appear for interviews about the decision to shorten the timeline.

The 2020 Census has been plagued by problems related to the pandemic, including the potential for increased inaccuracy as more time passes beyond April 1, the official census day. The bureau has also struggled with a high dropout rate among temporary staffers hired to conduct door-to-door knocking and other operations.

On Monday, the government announced it was appointing Benjamin Overholt, a statistician with conservative ties, as the bureau’s deputy director for data. The appointment, the bureau’s third this summer, was unusual for the agency and has increased fears among census experts that the administration is seeking to influence the count.