A federal judge on Wednesday signaled that he may be willing to order Hillary Clinton to testify about the decision to conduct official business on a private email server while she served as secretary of state.

U.S. District Judge Emmet Sullivan said in an order made public Wednesday that it "may be necessary" for Clinton to be deposed in an ongoing Freedom of Information Act lawsuit seeking unrelated employment records for one of her closest advisers while she was at the Department of State.

The judge said "questions surrounding the creation, purpose and use of the clintonemail.com server must be explored" so that he may assess whether it was put in place to circumvent federal open-records laws.

Prior to the revelations that the email server existed, Judicial Watch, a conservative watchdog group, sued the Department of State to seek disclosure of the employment records of Huma Abedin, Clinton's deputy chief of staff, with an eye toward unearthing potential conflicts with private sector work Abedin engaged in while at the department.

Once some of the records were produced, the parties agreed to dismiss the case in early 2014. But when The New York Times reported on the existence of the email server last March, the watchdog group went back to court and later alleged that Clinton and State "sought to deliberately thwart" the Freedom of Information Act with the setup of the server.

In Wednesday's order, Sullivan seemed to cabin the implications of the case, noting that it involves the "narrow legal question" of whether State acted in good faith when it produced the records under the original request.

"Although the State Department has taken some action to recover federal records related to this case," Sullivan wrote, "those efforts do not resolve the question of whether the agency’s search in response to Judicial Watch’s FOIA request was reasonable."

To get to the bottom of that legal question, Sullivan allowed lawyers for Judicial Watch to seek testimony from Abedin and Cheryl Mills, Clinton's chief of staff in her four years at State, as well as from other State employees who were involved in the deliberations surrounding the setup of the email system.

Once that round of depositions and other evidence is collected in the case, for which the court gave an eight-week timeline, Sullivan said the lawyers can ask him for "permission" to also seek Clinton's testimony.

This, Sullivan wrote, would "enable the Court to resolve, as a matter of law, the adequacy of the State Department’s search of relevant records" related to the initial Abedin inquiry.

As a result of a separate freedom of information lawsuit brought by Vice News, the State Department has released tens of thousands of unclassified emails from the server on a rolling basis. That process hit some snags, but it was complete as of Feb. 29.

Through it all, Clinton has insisted that she did not personally send any emails with classified information during her tenure at State.

All of the above is wholly unrelated to a separate FBI probe in the controversy. The bureau so far has only acknowledged that it's "working on matters" related to the email server, but has declined to reveal the scope of the investigation.

A Politico review of similar cases where officials mishandled highly sensitive government information, published last month, suggested that Clinton won't face federal charges.