Confess or die.

That's what some inmates were told by jailhouse informants whom prosecutors and sheriff’s deputies in Orange County, California, recruited to illegally “coerce” confessions out of prisoners, according to a bombshell lawsuit filed Wednesday by the ACLU.

Orange County District Attorney Tony Rackauckas and Orange County Sheriff Sandra Hutchens—who are being sued by the ACLU for violating a defendants’ rights to an attorney—are accused of paying the “professional” informants and promising to reduce their sentences if they elicited confessions from their fellow inmates.

The sheriff’s department has been operating the “secret jailhouse informant program” for “well over thirty years,” with the district attorney’s knowledge, the 41-page complaint states.

“They have won countless convictions based on unreliable information — the results of jailhouse informants’ coercion of defendants — that they passed off in court as solid, sound, and legal,” ACLU Staff Attorney Brendan Hamme said in a press release. “Hiding the facts of the coercion from the defense is just one of the many ways they broke the law and endangered justice.”

Some informants threatened prisoners with violence—even telling them they were “greenlit”—or “on a hit list to be assaulted or even executed on sight,” the lawsuit alleges. The ACLU claims that those subjected to the threats had little choice, their only options being to “confess or die.”

Informants were richly rewarded, the suit says.

“Informants were paid handsomely—hundreds of thousands of dollars, in some cases—and often given time off their own sentences in exchange for unlawfully collecting this information,” the court papers state.

The conversations and confessions were used by county prosecutors, according to the ACLU. In one case, a tape recorder placed in an informant's cell captured over 100 hours of conversation with an inmate, the lawsuit charges. In another case, an informant wore a wire during conversations with an inmate.

Jailhouse informants are a legal way to obtain information, but only to “thwart crimes being planned inside or outside the jail”—and only if the prisoner gives details unprompted, according to The Guardian. It's illegal for the state or affiliated individuals to interview a prisoner without offering them legal representation.

The sheriff’s department, the district attorney’s office, and the informants allegedly worked in tandem, with law enforcement identifying a “target inmate” and the sheriff’s department moving the informant close to the target—which often meant being in the same cell or the cell next door.

Law enforcement allegedly went so far as to group informants and targets together in one area, often called the “informants tank.” Court documents state that law enforcement created a “core group” of informants who were often “members of criminal street gangs, such as the Mexican Mafia.”

Then there’s the alleged cover-up. The lawsuit claims that the sheriff's department “repeatedly lied under oath about the program’s existence and participants.” Those in the scheme also suppressed evidence that would reveal the nature of the program, including information that would prove “favorable to criminal defendants who have interacted with these informants,” the lawsuit says.

For example, two informants independently determined that Luis Vega, a 14-year-old who was arrested on an attempted murder charge in 2009, was innocent, the court papers allege. The informants told law enforcement that another inmate who'd been arrested for the same murder, Alvaro Sanchez, was solely responsible for the crime, according to the lawsuit.

But that information was never shared with Vega’s lawyer, and the teen spent two years in jail before the district attorney's office dropped his charges–“all because they wanted to hide the existence of the illegal Informant Program,” the lawsuit says.

“The fact [Vega] was allowed to languish in jail for two years, despite two different informants providing information that he was innocent, is an outrage and shows the depths to which the [Orange County District Attorney]’s office is willing to sink to conceal evidence of their illegal informant program,” Hamme told The Daily Beast.

The Orange County Sheriff's Department said they “do not comment on pending litigation” but have “cooperated fully with the CA Attorney General and Department of Justice investigations into the use of informants in the OC Jail.”

In a statement, the DA's Office said the “use of informants has been consistently upheld by the United States Supreme Court."

"Therefore, the Orange County District Attorney’s Office will continue to lawfully use all evidence lawfully developed by local law enforcement,” it said.