A high-stakes, six-month battle over who should be counted for representation in Congress ended quietly in a judge’s chamber Friday night when the Trump administration agreed not to release any population numbers from the 2020 Census for congressional apportionment or redistricting before the president leaves office.

Judge Lucy H. Koh of the U.S. District Court for the Northern District of California approved the agreement, which also stipulates a three-week pause in a lawsuit challenging the government’s timeline for completing and processing the decennial count. The stay will allow the Biden administration to assess its position in the case.

The case revolves around the timing of the census. Because of delays caused by the coronavirus pandemic, the Census Bureau had said in April that it needed four additional months to complete the count.

But in August, days after President Trump announced that he would seek to exclude undocumented immigrants from being counted for apportionment, the government abandoned that plan. Instead, it said it planned to deliver numbers for apportionment by the statutory deadline of Dec. 31 and cut the usual data processing time in half.

The suit was brought by the National Urban League and a group of counties, cities, advocacy groups and individuals who said a truncated schedule would irreparably harm communities that might be undercounted.

Since then, the administration has pushed to get data to the president before he leaves office, culminating this past week in reports from bureau whistleblowers that political appointees were pressuring them to release data by Friday, regardless of its accuracy.

Those reports prompted calls from civil rights groups and Democratic lawmakers for Census Bureau Director Steven Dillingham to resign.

One of them, Rep. Carolyn B. Maloney (D-N.Y.), chairwoman of the House Committee on Oversight and Reform, said in a statement Friday that she had lost her faith in his ability to lead the bureau.

“Rather than ensure an accurate count, Dr. Dillingham appears to have acceded repeatedly to the Trump Administration’s brazen efforts to politicize the Census,” she said. “He has failed to be open and transparent with Congress, and recent events indicate he has lost the confidence of Census Bureau staff. If he does not resign, I urge President-elect Biden to remove Dr. Dillingham after taking office on January 20.”

Three federal courts had blocked Trump’s memorandum on excluding undocumented immigrants from apportionment, calling it illegal, unconstitutional or both. The Supreme Court last month dismissed the case, saying it was premature to rule before Trump had a chance to act on it.

Excluding undocumented immigrants from representation would have probably shifted some House seats away from immigrant-heavy states and given them to states with higher percentages of White residents. It was never clear how the government planned to count the number of undocumented immigrants by state to subtract them from the total population counts, as no such tally exists.

In a hearing before Koh on Friday, Justice Department lawyer Brad Rosenberg explained the reasoning behind the government’s request for the stay.

“There is going to be a change of administration in just a few days,” he said. “At this point, regardless of what may or may not have transpired, the government thinks that it is appropriate to transition this matter to the next administration.”

A stay, he said, “would most efficiently allow for that transition to take place and for the new administration to evaluate operations within the Census Bureau and the Department of Commerce, and for the Department of Justice to evaluate this litigation as well.”

The agreement also bars the government from releasing any citizenship data for apportionment or redistricting, information Trump requested in 2019 after the Supreme Court blocked his administration’s attempt to add a citizenship question to the census.

The agreement does not set a final deadline for the reporting of apportionment or redistricting numbers. If the government finalizes any data after Jan. 20 but before the end of the stay, it agreed to give plaintiffs seven days’ notice before releasing it publicly.

Thomas Wolf, senior counsel and Spitzer fellow at the Brennan Center for Justice at NYU Law, which is among those representing the plaintiffs, hailed the agreement.

“After several years of chaos that have threatened the accuracy and integrity of the count, the Trump administration has committed to standing down on reporting 2020 Census numbers — including citizenship numbers — in a significant victory for our lawsuit challenging the rush of the count,” he said.

“The bureau will have more time to work on the numbers before they are released, instead of facing an artificial deadline of completing the task before President Trump leaves office. This increases the likelihood of a full, fair and accurate count.”