A U.S. federal judge ruled on Friday that Democratic Party presidential candidate Hillary Clinton must answer written questions in a lawsuit concerning her use of an unauthorized private email system for her work as U.S. secretary of state.

The judge concluded that Clinton did not need to give sworn testimony.

Just in: judge orders Hillary Clinton to answer q's in writing about email server, but rejects request to depose her https://t.co/c7EbPwRYuq — Zoe Tillman (@ZoeTillman) August 19, 2016

Clinton must respond in writing within 30 days to questions submitted by Judicial Watch, a group that has long been critical of her conduct and which is suing the Department of State overClinton-era records.

Judge Emmet Sullivan’s ruling in U.S. District Court in Washington is likely to be a relief to Democrats, who did not welcome the prospect of Clinton having to submit to hours of questioning by lawyers in the middle of her campaign for the Nov. 8 election against Republican Party candidate Donald Trump.

Clinton, who served as the country’s top diplomat from 2009 to 2013, has apologized for her decision to use the unorthodox email set-up, which had the effect of shielding her communications from public-records laws until the arrangement came to light last year.

Voters have said in opinion polls that the email server issue contributes to impressions thatClinton is untrustworthy. The U.S. Department of Justice concluded last month there were no grounds to prosecute Clinton for the arrangement following a year-long investigation.

Sullivan has allowed Judicial Watch to obtain sworn testimony in sometimes testy exchanges with several Clinton aides in recent months, saying the court needs to establish whether the server was set up to thwart the Freedom of Information Act.

But the judge agreed with Clinton’s lawyers that former high-ranking government officials can be ordered to give sworn testimony only in “exceptional circumstances.”

Sullivan also allowed Judicial Watch to get sworn testimony from a former State Department official named John Bentel.

According to a scathing report by the State Department’s inspector general, Bentel, then a technology official in Clinton’s office, told junior staffers to never speak of Clinton’s email server again after they raised concerns. Bentel and his lawyer have declined to comment on the episode.

A spokesman for Clinton could not immediately be reached for comment on Friday.

Judicial Watch said it was happy with the ruling.

“We will move quickly to get these answers,” Tom Fitton, the group’s president, said in a statement. “The decision is a reminder that Hillary Clinton is not above the law.”

(Reporting by Jonathan Allen, additional reporting by Luciana Lopez; editing by Grant McCool)