NEW YORK (Reuters) - A second federal judge has taken the rare step of allowing a group suing for records from Hillary Clinton’s time as U.S. secretary of state to seek sworn testimony from officials, saying there was “evidence of government wrong-doing and bad faith.”

The language in Judge Royce Lamberth’s order undercut the Democratic presidential contender’s assertion she was allowed to set up a private email server in her home for her work as the country’s top diplomat and that the arrangement was not particularly unusual.

He described Clinton’s email arrangement as “extraordinary” in his order filed on Tuesday in federal district court in Washington.

Referring to the State Department, Clinton and Clinton’s aides, he said there had been “constantly shifting admissions by the Government and the former government officials.”

Spokesmen for Clinton did not immediately respond to a request for comment.

The case is a civil matter, but the order adds to the legal uncertainty that has overshadowed Clinton’s campaign to be the Democratic nominee in the Nov. 8 presidential election.

The FBI is also conducting a criminal inquiry into the arrangement after it emerged that classified government secrets ended up in Clinton’s unsecured email account. Clinton has said she does not think she will be charged with a crime.

Lamberth’s order granted the request by Judicial Watch, a conservative watchdog group suing the department under open records laws, to gather evidence, including sworn testimony. The group has filed several lawsuits, including one seeking records about the 2012 attack in Benghazi, Libya, that killed U.S. Ambassador Christopher Stevens and three other Americans.

“Where there is evidence of government wrong-doing and bad faith, as here, limited discovery is appropriate, even though it is exceedingly rare in FOIA (freedom-of-information) cases,” Lamberth noted in his order.

The government is normally given the benefit of the doubt that it properly searched and produced records.

Since the email arrangement came to public knowledge a year ago, the State Department has found itself defending Clinton in scores of lawsuits from groups, individuals and news outlets who say they were wrongly denied access to Clinton’s federal records.

Clinton left the department in 2013, but did not return her email records to the government until nearly two years later.

Last month, Judge Emmet Sullivan, who is overseeing a separate Judicial Watch lawsuit over other Clinton-related records, allowed a similar motion for discovery.