Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A federal judge on Tuesday took a shot at the State Department for the slow release of the last of Hillary Clinton's emails, imposing a new set of deadlines for the documents to be made public.

Judge Rudolph Contreras was told by government lawyers that speeding up the process could hurt national security if there's sensitive information inadvertently released in the remaining 3,700 messages.

Related: Clinton Emails Held Indirect References to Undercover CIA Officers

"Government has put me between a rock and a hard place," said a clearly annoyed Rudolph, a U.S. District Court judge in D.C., according to reports.

The government was supposed to release all of the documents by Jan. 29, but asked for a month-long extension to continue vetting the emails.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Since May, the State Department has posted online some 30,000 of Clinton's emails while she was secretary of state — done after Vice News reporter Jason Leopold filed a Freedom of Information Act request a year ago.

Clinton, who is running for the Democratic presidential nomination, had used her personal email for doing government business — something she apologized for while on the campaign trail as Republicans pounced on the admission.

Under Contreras' new guidelines, the State Department by Wednesday must explain why it cannot immediately post online a portion of the remaining emails that have already been through all the security reviews.

State Department lawyers said at Tuesday's hearing that it wouldn't get those up until Feb. 18 at the earliest.

The explanation must also address whether other means of production could be used, such as simply emailing PDFs of the reviewed documents directly to Vice News.

Related: State Department Declares Some Hillary Clinton Emails 'Top Secret'

Finally, by Friday, the State Department must explain exactly how it missed last month's deadline for posting all the Clinton emails. State Department lawyers have said they discovered in early January that 7,000 pages of emails were not sent out for security review along with all of the rest.

About two dozen emails have been declared "top secret" because of what they contain, and won't be released.

The release of Clinton's emails have been closely examined for more insight into what happened when she was secretary of state during the deadly 2012 attack on the U.S. consulate in Benghazi, Libya.

The emails have also revealed exchanges in which Clinton apparently struggled with modern technology and repeatedly sought advice from longtime friend Sid Blumenthal.