Nika Pailodze / EyeEm via Getty Images The San Francisco public defender filed a formal complaint after women in a county jail said they were forced to strip naked in front of male deputies.

Women incarcerated in a San Francisco jail say they were forced to strip naked in front of male deputies, in violation of state law, according to complaints released by the San Francisco public defender’s office.

In California, strip searches of inmates must be conducted in an area with privacy, and with no one of the opposite sex within sight.

Jeff Adachi, San Francisco’s public defender, filed a formal complaint with the San Francisco Sheriff’s Department in January after hearing reports from women about the searches.

His office collected the stories of 16 women who said they experienced inappropriate strip searches inside County Jail No. 2, which is the only jail in San Francisco city that houses women. About 90 percent of the women held there have yet to be convicted of a crime, Adachi said.

“While strip searches are allowed in a jail or prison setting, they can’t be arbitrarily carried out or carried out in a way that is unreasonable, without any basis,” he told HuffPost. “Based on the reports that we were receiving, the grounds for the strip searches were questionable and the way they were being performed ― with male guards in eyeshot and other inappropriate conduct by the deputies ― raised some red flags for us.”

At least 12 women reported that they were strip-searched in locations where they were visible to male deputies. Most of them asked to withhold their names from the formal complaint due to fear of retaliation.

One woman described how she was asked to get naked, squat, cough and lift up both breasts within eyesight of several male guards and other female inmates. She reported making eye contact with a male deputy during the search. Afterward, she told a lawyer, the deputy informed her and other inmates that he didn’t have a girlfriend and that he found some of them attractive.

Another woman reported that she was searched next to a toilet containing unflushed blood, urine and feces. She worried that being strip-searched near an open door allowed for the jail cameras to film her naked body.

“Our concern is that the sheriff’s department does not appear to be following a consistent protocol in conducting these strip searches,” Adachi said. “Our clients felt like their privacy, although limited because they are in custody, was being violated.”

Many women said they found the strip searches distressing, using words such as “especially degrading,” “humiliating,” “violating” and “unusual.”

San Francisco Sheriff Vicki Hennessy has launched an investigation into the allegations.

Women in jail are the fastest-growing segment of America’s incarcerated population. They are overwhelmingly poor and low-income, and have high rates of trauma, mental and physical illness and histories of substance abuse, according to a 2016 report.