The U.S. Department of Justice launched a civil rights investigation of the Orange County District Attorney’s Office and the Sheriff’s Department on Thursday over allegations that prosecutors and deputies withhold evidence and use jailhouse informants to illegally obtain confessions.

The investigation, announced by federal prosecutors in Los Angeles, comes after years of complaints from local defense attorneys that the district attorney and sheriff’s deputies routinely cheat in court, misuse informants and secretly tape conversations in jails to get convictions. While there have been high-profile federal investigations into police agencies, the Justice Department rarely investigates prosecutors.

In January, District Attorney Tony Rackauckas, who has denied intentional wrongdoing, wrote a letter to U.S. Attorney General Loretta Lynch saying his office would welcome a federal investigation. The office issued a statement Thursday saying it would cooperate with investigators and expects to be exonerated.

RELATED: ‘Inside the Snitch Tank’: Read the full story of murder, misconduct and justice delayed

Sheriff Sandra Hutchens also issued a statement offering her department’s cooperation, adding: “I welcome this review … It is, and has been, our ultimate goal to have a jail system that is exemplary.”

The Justice Department can go to court to force local cooperation if the District Attorney’s Office or Sheriff’s Department declines.

“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,” Principal Deputy Assistant Attorney General Vanita Gupta, head of the Justice Department’s Civil Rights Division, said in a news release.

“Our investigation will examine the facts and evidence to determine whether the district attorney’s office and sheriff’s department engaged in a pattern or practice of violating these rights. We are grateful to District Attorney Rackauckas for the unrestricted access he has offered to provide.”

FIX THE SYSTEM

The Justice Department’s announcement of its investigation came in the form of a letter to the Board of Supervisors, which oversees the District Attorney’s Office and Sheriff’s Department budgets. Several supervisors said Thursday that they welcome the investigation.

What effect, if any, the Justice Department’s investigation will have on the operations of the Orange County jail and the District Attorney’s Office still is to be determined.

“We appreciate the District Attorney’s invitation to review his office’s policies and practices, along with his assurance of unfettered access to documents and personnel in his office,” U.S. Attorney Eileen Decker of the Central District of California said in a separate news release. “We are confident that this investigation, and the cooperation being offered by the Orange County District Attorney’s Office, will help restore public confidence in the integrity of the Orange County criminal justice system.”

Orange County Public Defender Sharon Petrosino, whose office was instrumental in uncovering the misconduct that has been alleged, said the investigation could help fix the local justice system.

“This is an important development in moving forward to address the systemic problems that have been uncovered during the (Scott) Dekraai case,” Petrosino said. “I plan to follow this closely.”

WHY THE INVESTIGATION?

The move by federal officials follows a series of high-profile condemnations of Orange County’s judicial system.

Last month, a state appellate court issued a ruling that described constitutional abuses by local prosecutors and deputies as “systemic,” adding that in at least one high-profile case the District Attorney’s Office had abdicated its responsibility to follow the law. At the same time, the Orange County grand jury received money from the county to conduct an investigation into the District Attorney’s Office and Sheriff’s Department. Also, the California attorney general has been investigating local officials for at least 18 months.

While the Department of Justice rarely investigates local prosecutors, some high-profile probes of police agencies have resulted in federal oversight, at least temporarily, of those departments.

In 2000, the Los Angeles Police Department was taken over by federal officials after an investigation into allegations of corruption and criminal abuses within the department.

In 2009, the Department of Justice’s Civil Rights Division investigated operations at the Orange County jail after a series of incidents, including a fatal stomping of an inmate. That investigation remains open.

The investigation announced Thursday puts Orange County in the company of places like Ferguson, Mo., and Baltimore, where the Justice Department launched probes of allegations of police brutality and civil rights violations after citizens died at the hands of police.

In Missoula, Mont., federal investigators recently found that local police and prosecutors failed to properly respond to allegations of rape and other sex crimes.

CASES AFFECTED

In addition to federal, state and local investigations, the allegations of abuses in Orange County have sparked criticism from the legal community.

In November 2015, three dozen legal scholars and former prosecutors from around the country called on Lynch to investigate what they termed “a crisis” in Orange County’s justice system. The letter noted that murder cases were falling apart and being delayed as defense lawyers explored evidence of misconduct by prosecutors and police.

Earlier this year, a panel of lawyers convened by Rackauckas to offer improvements to his office issued a report that said local prosecutors had a “win at all costs” mentality.

The new investigation also comes after county prosecutors – and, in theory, the people they represent – have suffered setbacks in court because of allegations against prosecutors and deputies.

At least a half-dozen murder and attempted murder cases have been renegotiated or settled after judges found prosecutors broke rules to get convictions.

In March 2015, a Superior Court judge removed local prosecutors from the worst mass murder case in county history, saying the office “couldn’t be trusted” to protect the rights of defendant Scott Dekraai. The former tugboat crewman had already pleaded guilty to killing eight people at a Seal Beach salon in 2011.

Evidence and testimony show that prosecutors, police and deputies wired his cell and employed a jail informant to get evidence on Dekraai, even though he was already represented by a lawyer, a violation of his federal rights.

A state appellate court last month affirmed that decision, handing the penalty phase in the Dekraai case to the California attorney general.

Separately, a hearing is underway that might result in removing local prosecutors from a second case. It’s unclear whether any local prosecutor has been removed from two cases.

Though Rackauckas and Hutchens have acknowledged cases of individual misbehavior by prosecutors and deputies, they’ve steadfastly denied there is a systemic problem in the local judicial system. They’ve attributed what has come to be known as the “snitch scandal” to an out-of-control defense bar, led by Assistant Public Defender Scott Sanders, and biased media coverage.

This month, in response to a motion filed by Sanders in the Dekraai case, the Sheriff’s Department was forced to turn over thousands of pages of computer logs. Those logs showed that deputies regularly tracked jailhouse informants to help prosecutors.

MORE: Read the detailed jailhouse informant sheriff’s logs

Laura Fernandez, a Yale Law lecturer specializing in prosecutorial misconduct, said she hopes federal investigators take a sweeping look at justice in Orange County.

“The Department of Justice is uniquely well-positioned to investigate longstanding, systemic misconduct,” Fernandez said.

“My hope is that a thorough investigation in Orange County will not only remedy past injustices, but prevent future ones, and in so doing restore the integrity of the criminal justice system.”

http://launch.newsinc.com/js/embed.js