San Francisco county jails will become some of the first in the nation to house inmates according to their gender identity, the sheriff’s department announced this week. In many facilities, transgender people are housed according to their sex assigned at birth, while in San Francisco transgender people are housed in a special unit isolated from other inmates. In a press release, the department described the move as “a major show of commitment to recognizing and respecting all people’s gender identities.”

In the first phase, transgender women currently housed in a men’s detention facility will be allowed to participate in programming at a women’s prison, like women’s empowerment groups and education about drug and alcohol abuse. The department plans to eventually offer them the option to be housed there, and vice versa for transgender men.

Transgender women face a much higher risk of sexual assault when housed in men’s prisons. Attempts to protect them often involve long-term isolation, sometimes for up to 23 hours a day. “What they do is put people in solitary confinement, which is torture,” said Mara Keisling, executive director of the National Center for Transgender Equality. “It’s meant generally to keep other people safe from the person and not the other way around.” Advocates say this often causes psychological trauma and that such “neglect” can lead to high rates of recidivism. In the case of jails like San Francisco, advocates say that isolating them in groups can make them easier targets for harassment or verbal abuse.

LGBT rights groups that have worked for years with the San Francisco sheriff’s department were guarded about their praise. “Unfortunately, while this policy addresses the need of transgender inmates to have equal access to programming,” said Flor Bermudez of the Transgender Law Center, “it does not offer an adequate solution to the dramatically increased risk of sexual assault transgender women in prison face.” She said she applauds the notion of changing housing policies but has yet to see any concrete proposal describing how it will work, with key details like intake procedures, as well as who will be evaluating inmates and how.

Bermudez and other advocates dedicated to reforming detention policy have sought for transgender people to be housed on a case-by-case basis, ultimately placing them wherever they feel safest. Some transgender men, for instance, might feel safer in a women’s prison. Transgender people come to jail in varying states of transition, Bermudez said, which might cause them to prefer one facility or the other. “Transgender people are different and the risk for one is different than another and their sense of safety is different,” she said.

Though statistics are hard to come by, given that booking processes generally do not involve cataloging gender identity, experts say transgender people tend to be incarcerated at higher rates than the general population. Surveys have found that they experience discrimination, poverty and homelessness at much higher than average rates, which are all risk factors.

In most states, there is no law that forbids firing someone or denying them housing based on their gender identity (though advocates are fighting to pass a federal non-discrimination law that would cover these areas). “Their level of economic fluency is really small,” Bermudez said, “so many of them have engaged in survival crimes,” which may involve sex work or involvement with drugs.

In its statement, the sheriff’s department acknowledged transgender people’s disadvantaged status in society. “Since the transgender population is marginalized on the streets of America, consider how that marginalization is magnified inside prisons and jails,” San Francisco Sheriff Ross Mirkarimi said upon announcing the policy shift. “This is a reality we want to change for our San Francisco jails—and hopefully beyond.”

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Katy Steinmetz at katy.steinmetz@time.com.