(Bloomberg) -- The Trump administration was blocked from completing the 2020 census on a faster time line after civil rights group complained the plan would undercount minorities.U.S. District Judge Lucy Koh in San Jose, California, ruled Thursday that U.S. Secretary Of Commerce Wilbur L. Ross violated federal law by ordering a census “replan” that compressed deadlines and curtailed data collection.Civil and immigration rights organizations and cities including Los Angeles and Chicago argued that the truncated timeline would undercount minorities, resulting in less federal and state funding for the areas they live in for at least a decade. The results of the census are used to apportion seats in Congress and divvy up the Electoral College votes that pick the president.

In her ruling, Koh pointed to King County, Washington, Los Angeles, and Harris County, Texas as leading examples of places that stand to lose federal funding that turns on census data.“An undercount in any locality matters greatly,” Koh wrote. “Even a small undercount of a subset of the hard to count population would result in the loss of federal funding.” The judge blocked the Replan’s Sept. 30 deadline to complete data collection and a Dec. 31 deadline to report a tabulation to the President.

A Commerce Department spokesperson didn’t immediately return a call and email seeking comment.

The once-a-decade census has faced challenges from the coronavirus pandemic especially in hard-to-count communities. Suddenly and without explanation, plaintiffs argued, Ross’s Aug. 3 plan shortened data processing time lines from eight months to accommodate for Covid-19 to four months.

Read More: Trump Administration Vows Supreme Court Appeal on Census Count

Emails produced in the lawsuit showed the decision to cut the time line in half wasn’t made by the Census Bureau but instead ordered by Ross, and flowed from President Donald Trump’s July 21 order aimed at removing undocumented immigrants from apportionment counts. The July order was a blocked by a judge and the administration vowed an appeal to the U.S. Supreme Court.

The government’s goal was “suppressing the political power of communities of color by excluding undocumented people from the final apportionment count,” plaintiffs argued.

Koh agreed that in addition to losing funding, undercounted localities stand to lose political representation. The judge cited evidence showing the Census Bureau was under political pressure from the Commerce Department to stop seeking extensions for its data collection.

The case is National Urban League v. Ross, 20-cv-05799, U.S. District Court, Northern District of California (San Jose).

(Updates with judge’s ruling in fourth paragraph.)

©2020 Bloomberg L.P.