A federal judge has issued a scathing decision that orders a new review of Hillary Clinton's use of a private and unsecure email system for classified information while she was secretary of state.

The ruling from Judge Royce Lamberth comes in a case brought by Washington Watchdog Judicial Watch to obtain information regarding the terror attack on an U.S. outpost in Benghazi that left four Americans dead.

The ruling instructs the Departments of State and Justice to work with Judicial Watch on a proposed schedule for discovery into whether Clinton tried to evade the Freedom of Information Act.

It also must be determined whether the State Department acted in "bad faith."

TRENDING: Growing list of white liberals caught pretending to be black

Calling Clinton's use of that private email one of "the gravest modern offenses to government transparency," the judge placed blamed on federal bureaucrats under President Obama, saying his State and Justice Departments "fell far short."

"So far short that the court questions, even now, whether they are acting in good faith," he said. "Did Hillary Clinton use her private email as secretary of state to thwart this lofty goal (Obama's 'transparency')? Was the State Department's attempt to settle this FOIA case in 2014 an effort to avoid searching – and disclosing the existence of – Clinton's missing emails? And has State every adequately searched for the records in this case?"

Judicial Watch President Tom Fitton said the "historic court ruling raises concerns about the Hillary Clinton email scandal and government corruption that millions of Americans share."

"Judicial Watch looks forward to conducting careful discovery into the Clinton email issue," he said, "and we hope the Justice Department and State Department recognize Judge Lamberth's criticism and help, rather than obstruct, this court-ordered discovery."

The judge said the State Department's "attempt to pass off its deficient search as legally adequate during settlement negotiations was negligence born out of incompetence."

"At worst, career employees in the State and Justice Departments colluded to scuttle public scrutiny of Clinton, skirt FOIA, and hoodwink this court," he said.

Lamberth said the current Justice Department has made things worse.

"When the government last appeared before the court, counsel claimed, 'It is not true to say we misled either Judicial Watch or the court.' When accused of 'doublespeak,' counsel denied vehemently, feigned offense, and averred complete candor. When asked why State masked the inadequacy of its initial search, counsel claimed that the officials who initially responded to Judicial Watch's request didn't realize Clinton's emails were missing, and that it took them two months to 'figure out what was going on.' ... Counsel's responses strain credulity."

Among the many questions that remain is why the Obama administration vehemently claimed that Benghazi was just a protest gone bad when Clinton's records indicate she knew almost immediately that it was a terrorist attack.

"Did the department merely fear what might be found?" the judge wrote. "Or was State's bungling just the unfortunate result of bureaucratic redtape and a failure to communicate? To preserve the Department's integrity, and to reassure the American people their government remains committed to transparency and the rule of law, this suspicion cannot be allowed to fester."

The order sets the stage for more investigation into apparently partisan actions under Obama that were not fully investigated even though Clinton ran for the presidency in 2016.

Judicial Watch sued to obtain the information in 2014, seeking an explanation for the State Department talking points after the September 2012 attacks on U.S. facilities in Libya.

The action came before the 2015 revelations that Clinton used a private and unsecure email account for her work as secretary of state.

The government initially claimed it had searched adequately for Benghazi-related documents and wanted to close the case brought by Judicial Watch.

Then the agencies admitted that further searches were needed, although they didn't at the time reveal they had received another 30,000 emails from Clinton.

When arguments were held before Judge Lamberth, Judicial Watch said it wanted to put Clinton under oath and ask about, among other issues, the identification of individuals with whom Clinton may have communicated by email, including State Department officials, other government officials or third-parties, such as Sidney Blumenthal.

At that hearing, the judge exhibited displeasure.

Judicial Watch reported at the time: "He also said he was 'dumbfounded' by the Justice Department for granting immunity to Cheryl Mills, a top Clinton aide. Judge Lamberth noted he had found Mills to have committed perjury in another Judicial Watch lawsuit. In an April 28, 2008, ruling relating to Ms. Mills conduct as a White House official in responding to concerns about lost White House email records, Judge Lamberth called Cheryl Mills' participation in the matter 'loathsome.' He further stated Mills was responsible for 'the most critical error made in this entire fiasco. ... Mills' actions were totally inadequate to address the problem.'"

According to Judicial Watch, the objective of the hearing was to seek the judge's order for depositions from Clinton, Mills and several others.