A transgender woman in Texas was forced to show her genitalia to jailers who questioned her sex in Dallas County after she was arrested on a weapons charge, an explosive lawsuit claims.

The lawsuit, which was filed Friday, alleges that Valerie Jackson, 32, was harassed, threatened and humiliated after being forced to display her sexual organs to a staffer at the Dallas County Jail following her arrest in November 2016 after she left a gun in her purse at Dallas Love Field Airport, the Dallas Morning News reports.

Jail staffers initially classified Jackson as a woman until authorities pressured her into exposing her genitals, according to the lawsuit, which seeks unspecified damages for emotional distress, torment and mental anguish.

“Ms. Jackson has suffered trauma, felt demoralized, anxious, stressed, a loss of dignity, and fear,” the lawsuit states, adding that county officials violated the federal Prison Rape Elimination Act, which prohibits jails from examining transgender or intersex detainees solely to determine their gender.

A decision regarding housing for transgender inmates in the county requires that it be made only after medical, psychological and medication assessments, but a jail employee bucked that obligation by telling Jackson she needed to expose herself because she would be housed with men if she had a penis, according to the lawsuit.

“We need to know if you’ve had a sex change or not,” an officer told Jackson, the lawsuit claims. “We need to see if you have a penis or a vagina. We have to protect you. We can’t put you with men if you have a vagina.”

Jackson then exposed her breasts in another area of the jail, according to the lawsuit. A nurse then asked about her menstrual cycle, prompting Jackson – who was born a male but legally changed her gender to female – to tell the woman she didn’t have a uterus and was transgender.

That, according to Jackson’s suit, led an unidentified Dallas County male employee to make a “look of shock” on his face and to inquire why Jackson’s paperwork indicated that she was female. Jackson then told the male employee that she was a female.

“Did you have a sex change or something?” he replied. “Have you had everything done down there?”

Jackson then “hesitantly and falsely” told the male employee that she had in an effort to end the “humiliating harassment” as quickly as possible, according to the lawsuit.

Jackson eventually exposed her genitals after being asked to pull down her pants and underwear by two other county employees.

“You’re [going] with the men because that’s what you are,” one county employee told her, the lawsuit claims. “You’re a man.”

Once in custody, Jackson was later subjected to several inmates telling her what they wanted to do to her sexually, “grabbing themselves,” calling her a “he-she” and other derogatory terms, according to the lawsuit.

Jackson was later put in a solitary cell in a men’s holding area. She was also taken to a men’s locker room and told to remove her clothing in front of a male officer, the lawsuit claims.

“Ms. Jackson was humiliated every time she encountered a new officer,” the lawsuit states. “Each time, they would see her and reference her as a woman, only to be told by whichever officer was escorting her in front of everyone that she was a man.”

A grand jury ultimately declined to indict Jackson on the gun charge, but she was later arrested twice on misdemeanor charges of trespassing and interfering with an emergency call, the Dallas Morning News reports.

Jackson was also housed with men and was forced to shower with them following those arrests in April and June. On both occasions, according to the lawsuit, a male inmate masturbated while staring at Jackson in the shower.

Both of those cases are still pending, the newspaper reports.

A spokeswoman for Dallas County Sheriff Marian Brown, who is named in the lawsuit, declined to comment, citing pending litigation.