A federal judge in California late Thursday blocked the Trump administration from stopping the 2020 Census count next week, saying it should continue until Oct. 31, the date the Census Bureau had planned on before the administration abruptly shortened the count.

U.S. District Judge Lucy Koh in the Northern District of California granted a preliminary injunction in the case brought by the National Urban League — a group of counties, cities, advocacy groups and individuals — and other groups. Koh had, earlier this month, issued a temporary restraining order to keep the count underway. The case is likely to be appealed to the U.S. Supreme Court.

In a hearing Tuesday, Koh had expressed irritation with Justice Department lawyers for missing a deadline she had set for them to produce internal documents connected to the case.

She referred repeatedly to documents finally released over the weekend and Monday in which career bureau officials said the data could not be properly collected and delivered to the president on the government’s new timeline.

“It is ludicrous to think we can complete 100% of the nation’s data collection earlier than 10/31 and any thinking person who would believe we can deliver apportionment by 12/31 has either a mental deficiency or a political motivation,” said Tim Olson, the bureau’s associate director for field operations, in an email in July.

Because of the coronavirus pandemic, the government had originally asked Congress for an additional four months to report its data — a delay the House approved in its coronavirus relief bill but the Senate has yet to approve.

Census Bureau officials had in April asked for a four-month extension to the constitutionally mandated deadline of Dec. 31, and by July they said they could no longer deliver a full and accurate count by that date. But after President Trump issued a memo July 21 saying undocumented immigrants should not be counted for apportionment, the government reversed its stance.

Lawmakers have also expressed concern about the change in schedule, saying a rushed count would lead to an inaccurate census that would hurt communities in hard-to-count areas in both Democratic and Republican states.

On Thursday, House Oversight Committee Chairwoman Carolyn B. Maloney (D-N.Y.) sent a letter to Census Bureau Director Steven Dillingham asking about leaked documents that appear to show the bureau cutting corners and breaking rules in the enumeration of homeless people in order to get the count done by Sept. 30.

Maloney asked for a briefing by Tuesday on how the Census Bureau has counted homeless people to date and how it would continue to do so if the count is extended.