For eight weeks at Pamunkey, she said she was confined for all but one hour in a day in a cell that smelled of urine, isolated from the general jail population solely for identifying as transgender. She said passing jail officers pilloried her with taunts and insults.

“This is your choice. If you had been a real man, you would never have had to come back here,” Ferguson-Hernandez, 35, recalled one of the officers saying.

“This is God’s way of punishing you for being what you are,” she said another remarked.

In March, she filed a complaint under the Civil Rights Act in U.S. District Court in the Eastern District of Virginia alleging discrimination but later withdrew the challenge. In the voluntary motion to dismiss, she wrote that she wanted to cancel the request because she was no longer at the jail, but in an interview she said she could not afford the court filing fees.

James C. Willett, the superintendent at Pamunkey, declined to answer questions specifically about Ferguson-Hernandez but said in an emailed statement that the jail complies with the federal Prison Rape Elimination Act.