A federal judge on Tuesday gave the Justice Department one day to explain why portions of the remaining 3,700 emails from Hillary Clinton's time as secretary of state can't be produced by Feb. 18.

U.S. District Judge Rudolph Contreras also gave the government until Friday to provide a detailed explanation of how the roughly 7,000 pages of emails were overlooked and not sent for interagency consultation earlier.

The government now has until the end of the month to release them. The State Department was ordered in May to release Clinton's emails from her tenure as secretary of state in May, and the State Department has been releasing a batch each month since June. They were to be finished by Jan. 29 but failed to meet the deadline, in part because of the 7,000 emails that were overlooked.

Get Breaking News Delivered to Your Inbox

Contreras oversees one of the many FOIA lawsuits that were filed to obtain Clinton's emails, and the Justice Department represents the State Department in these lawsuits. The lawsuits are separate from the FBI's investigation into Clinton's private email server that she used as secretary of state.

The judge's demands come the same day that New Hampshire voters head to the polls to cast ballots in the first-in-the-nation primary. Clinton has been trailing rival Sen. Bernie Sanders, I-Vermont, in numerous polls in the Granite State. It also comes a little more than a week after the State Department confirmed for the first time that Clinton's email server contained 22 "top secret" emails.

Last week, the State Department inspector general revealed he had discovered that former Secretary of State Colin Powell and aides to his successor Condoleezza Rice had confidential and secret information in their personal emails. Powell rejected the claims and said they were unclassified at the time and should be considered unclassified now.

CBS News' Justice Department correspondent Paula Reid contributed to this story.