Taronica White suffers an unusual side effect from her nine years of working at the Coleman Federal Correctional Complex in Florida.

“I can’t talk to a man if he has his hands in his pockets,” says White, 44, who worked at the Coleman prison from 2005 to 2014 as a corrections officer and a drug-treatment specialist. “That makes me very uncomfortable.”

Court documents in a recently settled class-action lawsuit explain why.

According to filings, inmates at Coleman regularly made lewd comments, gestures, and rape threats at female workers in the prison. They would stick their penises through the food slots in cell doors. They would grope, and catcall. And they would frequently masturbate in front of the women—sometimes through holes cut in their uniform pockets, sometimes with no effort at all to conceal what they were doing.

“Throughout my shift, inmates were masturbating everywhere. It felt like a free for all,” one woman said, according to court documents. “I probably saw 25 to 30 inmates masturbating during this one shift.”

The 524 women involved in the lawsuit are current and former employees in all departments of the prison, which is the largest federal complex in the country. They have worked as guards, teachers, nurses, or office workers. The $20 million settlement, which a Miami court notified them of on Feb.9, is one of the largest payouts in a class-action sexual harassment settlement in US history, lawyers for the women say. What’s unusual about the lawsuit is also that a court allowed a group of women to take action against their employer—in this case, the US government prison agency—for failing to address sexual harassment by non-employees.

According to the settlement, the management of the Coleman Federal Correctional Complex has agreed to a number of new workplace protections for the facility’s female employees, including staff training on sexual harassment, psychological screenings and treatment for inmates, and the issuing of inmate uniforms without pockets to make masturbating in front of prison workers more difficult.

Heidi Burakiewicz, the main lawyer on the case representing the women, said that while the legal team was happy with the settlement, “there’s no amount of money that is going to make up for all that these women went through—they’ve had relationships destroyed, marriages destroyed.”

The lawsuit claims that prison management consistently failed to protect its female employees, and even enabled their mistreatment. It alleges that inmates were not only not disciplined, but that the women were discouraged from writing incident reports documenting harassment. One woman who complained was allegedly told by a supervisor, “Well look at you, I would look too if I was an inmate.” Another says she was told, “If I was an inmate I would do the same thing.”

Burakiewicz said that at Coleman, there were multiple examples of inmates negotiating with prison workers, asking to be put in the vicinity of a specific female employee, for example, in exchange for their cooperation. She says these requests were granted.

White says she would not arrive to work without wearing something over her regular clothes, despite the 100-degree Florida heat. “You did not come inside the institution without wearing a jacket, or at least what we call a smock, and that’s because of the way that inmates treat you, the way management allows inmates to treat you.” The prison would not pay for the smocks, according to court documents, despite managers frequently encouraging the women to cover themselves up.

The general attitude appeared to be, in the words of one lieutenant, that “Coleman is a male institution where women should not work.” Another lieutenant, who was found shredding sexual harassment reports filed by female workers, allegedly put it in more crude terms: “I don’t want to deal with this bullshit and if these fucking cunts want to work in a man’s prison they need to learn to deal with it.”

Separate from the Coleman case, it’s important to note that sexual harassment or abuse in prisons often goes the other direction—according to a Department of Justice survey, half of all the alleged perpetrators of “sexual misconduct” in prison, which includes both rape and romantic relationships, were staff. Most of these reports by inmates are unsubstantiated by investigators, but even when they are, staff members are rarely punished, The Marshall Project reported.

Who is to blame?

White blames prison authorities, not the inmates, for the situation at Coleman. She says she worked at two Florida prisons before coming to Coleman, and never experienced the level of harassment she found there, even though some of the inmates overlapped, serving time in those facilities as well as Coleman. In her nine-plus years at the other prisons, she did not write up a single sexual harassment incident report, she says. At Coleman she wrote three in her first week. She describes a culture of impunity: “Inmates knew that doing these acts were violations of policy, but they knew that management wasn’t holding them accountable for their acts. If I know that I can get away with something, why not do it?”

Joe Rojas, head of the workers union at Coleman, who brought the issue to the attention of Burakiewcz’s team, says he had “mixed feelings” about the settlement. While he sees it as a step forward, “I just think the management officials were not held accountable for their non-actions,” he says.

The US Bureau of Prisons, the federal agency that is responsible for the Coleman facility, says it cannot comment while the settlement is in the process of being implemented.

In the 1977 case Dothard v. Rawlinson, the US Supreme Court ruled that disallowing a woman of slight build to be a guard at an Alabama prison was sexual discrimination. However, the court also ruled that Alabama was right in saying that hiring women as prison guards endangered them, and prohibited them from doing their job effectively, because as women, they were more susceptible to sexual assault than men. Here’s how justice John Marshall discussed this view in his dissent from this portion of the ruling:

With all respect, this rationale regrettably perpetuates one of the most insidious of the old myths about women – that women, wittingly or not, are seductive sexual objects. The effect of the decision, made I am sure with the best of intentions, is to punish women because their very presence might provoke sexual assaults. It is women who are made to pay the price in lost job opportunities for the threat of depraved conduct by prison inmates.

White, who says she was attracted to working in corrections in the first place because of the job stability, pay, and benefits, echoes this sentiment: “It really doesn’t matter where a female works, no one should be subjected to sexual harassment. No one goes to work to be discriminated against.”