A federal judge has intervened to block Cheryl Mills, Hillary Clinton’s chief of staff at the State Department, from deleting any emails in her possession after her attorney informed the State Department last week that she had instructed her client to do so.

U.S. District Court judge Emmet Sullivan issued the order late Friday in response to an urgent request from the watchdog group Judicial Watch, which is suing the State Department over its failure to produce records related to a special work arrangement granted to Huma Abedin, Clinton’s deputy chief of staff at State.

On Thursday, Mills’ attorney, Beth Wilkinson, wrote to Patrick Kennedy, the under secretary for management at State, that “following our production on August 10, 2015, we have instructed [Ms. Mills] to delete any and all electronic copies [of potential federal records] in her possession.”

Wilkinson did not provide a reason for her instructions to Mills to scrub her email account.

Judicial Watch wrote to Sullivan late Friday asking him to prevent Mills from deleting any potential federal records. Mills, who did not have a personal email account hosted on Clinton’s private email server, turned over some emails on June 25 and planned to hand more over on Monday.

But “any destruction of federal court records” would “blatantly” disregard an order that Sullivan issued late last month, Judicial Watch wrote to Sullivan. On July 31, Sullivan ordered Clinton, Abedin and Mills to turn over all federal government records under their possession or control. He also ordered the trio to certify under penalty of perjury that they did not delete any federal records.

Sullivan responded to Judicial Watch shortly after the group filed its request:

In view of the Government’s status report, the Court hereby directs the Government to request that Mrs. Hillary Clinton, Ms. Huma Abedin, and Ms. Cheryl Mills i) not delete any federal documents, electronic or otherwise, in their possession or control, and ii) provide appropriate assurances to the Government that the above-named individuals will not delete any such documents.

He also ordered the government to inform the court of the status of its compliance with the order no later than Wednesday. The State Department must also provide proof that Clinton, Abedin and Mills have made assurances that they will not delete any federal documents “in their possession or control.”

Wilkinson told The Daily Caller that Mills will comply with Sullivan’s order.

Clinton has turned 55,000 pages of her work-related emails to the State Department. But she has also deleted more than 30,000 emails from that account that she says were personal in nature. She also wiped clean the private server she used to host the email account.

In a statement issued on Monday, Judicial Watch president Tom Fitton said that the threat to destroy federal documents despite a court order “is par for the course for a Clinton-related scandal.”

“If not for the swift action of Judicial Watch’s legal team and an alert federal judge, there is no telling what important public information would have lost forever,” Fitton said. “The Obama State Department, Hillary Clinton, Cheryl Mills, and Huma Abedin should heed the court’s orders to preserve government records or face severe legal consequences.”

This post has been updated.

Follow Chuck on Twitter