LOS ANGELES ― The U.S. Department of Justice announced Thursday that it has opened a civil investigation into the Orange County district attorney’s office and sheriff’s department over allegations that both agencies have violated the rights of numerous defendants through a tainted jailhouse informant program.

“A systematic failure to protect the right to counsel and to a fair trial makes criminal proceedings fundamentally unfair and diminishes the public’s faith in the integrity of the justice system,” deputy assistant Attorney General Vanita Gupta, head of the DOJ’s Civil Rights Division, said in a statement.

The investigation will focus on allegations that the OCDA and OCSD “systematically used jailhouse informants to elicit incriminating statements from specific inmates,” inmates who had been charged and were already represented by attorneys. The investigation will also examine if county prosecutors violated defendants’ rights to a fair trial by “failing to disclose promises of leniency that would have substantially undermined the credibility of the informants’ trial testimony.”

Gupta said that the investigation will examine the facts and evidence to determine if the OCDA and OCSD “engaged in a pattern or practice of violating” defendants’ rights.

Orange County District Attorney Tony Rackauckas had previously requested that the Justice Department review his office’s informant policies and practices, and the DOJ said Rackauckas has offered “unfettered access to documents and personnel.”

For the past three years, the OCDA and OCSD have been embroiled in a sprawling jailhouse informant scandal ― one that may have involved the violation of multiple defendants’ civil rights, and that threatens to upend a number of already settled cases.

Assistant Public Defender Scott Sanders has been arguing for years that a tainted snitch network in county jails has existed in secret for decades. In a series of blockbuster motions, the defense attorney has gone on to unearth damning evidence pointing to the program’s existence, alleging that county prosecutors and police have violated multiple defendants’ rights by illegally obtaining and sometimes withholding evidence received from jail informants. His discoveries have led to multiple murder cases in the county unraveling, even resulting in some accused murderers having their sentences vacated.

“The Court of Appeal stated that the ‘magnitude of the systemic problems cannot be overlooked.’ It is hoped that the Justice Department’s probe will help reform the system so that all Orange County residents will receive the constitutional protections to which they are entitled,” Sanders said in a statement.

In November, a California appeals court affirmed an Orange County Superior Court judge’s decision last year to remove the county’s entire district attorney’s office from a high-profile mass murder case that has become embroiled in a scandal over a jail informant program. The court also blasted California Attorney General Kamala Harris’s appeal of the recusal.

Law enforcement authorities use informants to help bolster a case — a tactic that’s perfectly legal, even when the snitch receives something in exchange. But Sanders alleges that in some Orange County cases, informants held recorded and unrecorded conversations with inmates who were already represented by lawyers, which violates an inmate’s right to counsel. Prosecutors then allegedly took damning evidence gathered by the informants and presented it in court, while withholding evidence that could have been beneficial to the defense — which is a violation of a defendant’s right to due process.

It remains unclear exactly how many cases in the county may have been affected by tainted informant evidence, but Sanders has argued that every case involving a jailhouse informant in Orange County over the last three decades deserves to be re-examined.

The announcement of the DOJ investigation comes less than two weeks after a Superior Court judge released a trove of notes from a once-secret document kept by sheriff’s deputies detailing their involvement in a tainted informant program. The 242 pages of notes reveal the inner workings of the county’s infamous informant program, and appears to contradict testimony given by multiple sheriff’s deputies who had previously denied knowledge of working with informants. The notes also describe deputies’ recruitment and utilization of informants; destruction and falsifying of documents; collaboration with prosecutors and other local law enforcement agencies while operating “capers” to glean further evidence from inmates; and other unconstitutional scams they used to trick inmates into confessing to crimes.

The pages represent just a fraction of the total 1,157-page database, still largely under seal, which was in use between 2008 and 2013 and maintained by sheriff’s deputies who work in a branch of the department called “special handling,” which specifically deals with inmates and jail informants.

Multiple legal experts have repeatedly called for the DOJ to use its powers to conduct a full investigation of the OCDA’s office and the OCSD regarding the informant program.

“I welcome this review and investigation and will cooperate fully,” OC Sheriff Sandra Hutchens said in a statement.

“We are pleased to work with the USDOJ Civil Rights Division, provide all needed documents and information, and hope for an expedited conclusion to their civil inquiry,” the OCDA stated.

This story has been updated with statements from the Sandra Hutchens and the OCDA.