A federal judge on Wednesday directed State Department officials and top aides to Hillary Clinton to answer questions under oath by June 29 about whether they intentionally thwarted federal open-records laws by allowing Clinton’s use of a private email server throughout her tenure as secretary of state from 2009 to 2013.

The decision by U.S. District Judge Emmet G. Sullivan in Washington sets the stage for responses before July’s presidential nominating conventions — but does not ensure cooperation — from at least six current and former top officials, including Cheryl D. Mills, who was Clinton’s chief of staff at State; Huma Abedin, Mills’s deputy who now is vice chairman of Clinton’s Democratic presidential campaign; and Bryan Pagliano, a Clinton staff member during her 2008 presidential campaign who helped set up the private server.

While Sullivan did not permit questioning of Clinton herself for now, he wrote that the conservative legal watchdog group Judicial Watch may ask to do so later if it thinks “based on information learned during discovery, the deposition of Mrs. Clinton may be necessary.”

Sullivan’s 15-page written opinion and order came after lawyers for the government agreed to a narrowed scope of questions requested by Judicial Watch. The group filed a lawsuit over its 2013 public-records request for information concerning Abedin’s employment arrangement.

For six months in 2012, Abedin was employed simultaneously by the State Department, the Clinton Foundation, Clinton’s personal office and a private consulting firm connected to the Clintons.

The State Department released 52,000 pages of Hillary Clinton’s emails as part of a court-ordered process. Here's what else we learned from the publicly released emails. (Monica Akhtar/The Washington Post)

Sullivan authorized Judicial Watch to seek answers about the creation and operation of Clinton’s email system for official State Department business, and the department’s handling of Freedom of Information Act requests that could involve Clinton’s and Abedin’s emails.

The court also directed the department to explain in writing by May 25 which employees “had and/or used” an account on the Clinton system; who handled records requests for the secretary office’s emails; who inventoried Clinton’s and Abedin’s records and information; and who handled the Judicial Watch FOIA request.

[How Huma Abedin operated at the center of the Clinton universe]

“This was a scheme designed to thwart transparency, and it’s come undone,” Judicial Watch President Thomas J. Fitton said in an interview after the judge’s order. “We’re going to get facts that have been withheld from the American people, and hopefully figure out a way to make sure that all the records that should have been reviewed and released to the public are done so as required.”

Fitton said that while government lawyers have indicated that State Department employees will be available for questioning, Judicial Watch will have to issue subpoenas to former employees, and it is not clear whether they will object.

Pagliano, for example, invoked his Fifth Amendment rights before a House panel in September and was granted immunity by the Justice Department as part of a criminal investigation by the FBI into the possible mishandling of classified information.

Attorneys for Pagliano, Abedin and Mills did not respond to requests for comment on the judge’s action. The Justice Department also declined a request for comment.

View Graphic Catch up on the controversy and read the emails

Clinton campaign spokesman Brian Fallon said while the campaign continues to monitor developments in Judicial Watch’s “many, politically motivated” FOIA lawsuits, the campaign’s focus remained on the Justice Department’s investigation into whether laws were violated by the server arrangement. “Hillary Clinton has long expressed her willingness to cooperate in that review in order to help them complete their work,” Fallon said. “We remain confident that [the] review will affirm that nothing inappropriate took place.”

[U.S. judge orders discovery to go forward over Clinton’s private email system]

In Feb. 23 remarks from the bench, Sullivan criticized the government for “a constant drip” of shifting explanations after it was disclosed in March 2015 that Clinton exclusively used a personal server for government business while at State and that several aides also used the server or personal email addresses. Sullivan said the server arrangement allowed Clinton and other former employees to decide after the fact what government records to disclose, apparently without ensuring that State records were secured within the department’s own systems.

On Wednesday, Sullivan wrote that while the department argued that it did not have to search Clinton’s server because it did not possess or control it at the time, such a defense did not apply when an agency purposefully sought to circumvent a FOIA request.

Sullivan barred questions on the substance of Abedin’s employment arrangements, the handling of classified information or other matters subject to pending FBI or law enforcement investigations.

Others designated for deposition are Undersecretary for Management Patrick F. Kennedy; Stephen D. Mull, executive secretary at State from June 2009 to October 2012; and Lewis A. Lukens, executive director of the executive secretariat from 2008 to 2011.