Get all the latest news on coronavirus and more delivered daily to your inbox. Sign up here.

A federal judge in New York on Thursday sanctioned the Department of Justice for failing to produce more than 900 documents related to a lawsuit filed against the Trump administration for trying to include a citizenship question on the 2020 census.

“To be sure, this was not DOJ's finest hour," U.S. District Judge Jesse Furman wrote in his decision. “At best, DOJ failed to produce more than ten percent of the documents that Defendants were required to produce as part of this litigation."

WHITE HOUSE DEFENDS 'LAWFUL' CITIZENSHIP QUESTION ON CENSUS: 'HAVE A RIGHT TO KNOW WHO'S IN THIS COUNTRY'

As a result, the DOJ will have to pay a portion of the costs and fees of the nonprofit advocacy groups that sought the sanctions against them after they say new documents suggest Commerce Secretary Wilbur Ross may have sought to include a question about citizenship on the 2020 census in an effort to give an upper hand to Republicans and non-Hispanic whites during redistricting efforts.

Data collected from the U.S. census is used to help determine how many congressional seats and Electoral College votes are allotted to each state based on its population. It also helps lawmakers determine how to distribute $1.5 trillion in federal spending.

Ross said the intention behind the question would help enforce voting rights, an assertion which Furman rejected last year when he ruled in the case.

On Thursday, Furman ruled that Trump administration's failure to produce the documents “may well have been inadvertent, but is nevertheless unacceptable for any litigant, and particularly for the Department of Justice."

The DOJ said they did not share documents that they admitted to having during a congressional inquiry last year, because of a technical error during its document-search process. Furman described the error as “a lapse that would make a first-year litigation associate wince."

The judge refused a request by the nonprofit groups to grant sanctions for concealing evidence and false testimony from two witnesses. Furman said he was offering no opinion on whether those allegations were true, but even if they were true, it wouldn't have changed the outcome of the case.

A citizenship question is not on the 2020 census, which started in March and will continue through October. But President Trump instead has ordered the Department of Commerce to collect citizenship information through administration records.

CLICK HERE FOR THE FOX NEWS APP

The Associated Press contributed to this report.