The Trump administration on Friday rolled back rules that allowed transgender inmates to use facilities that match their gender identity, including cell blocks and bathrooms, thereby reversing course on an Obama administration effort to protect transgender prisoners from sexual abuse and assault.

The Bureau of Prisons now “will use biological sex” to make initial determinations in the type of housing transgender inmates are assigned, according to a notice posted Friday evening that modifies the previous policy.

“The designation to a facility of the inmate’s identified gender would be appropriate only in rare cases,” the new Transgender Offender Manual now says.

While the policy says a transgender inmate’s safety should be considered, officials also must “consider whether placement would threaten the management and security of the institution and/or pose a risk to other inmates in the institution.”

The policy apparently gives federal officials, for example, more leeway to place transgender women in cells alongside men — a circumstance that transgender advocates argue leaves transgender inmates vulnerable to violence and rape.

The shift comes after four evangelical Christian women in a Texas prison sued in US District Court to challenge the Obama-era guidelines, and claimed sharing quarters with transgender women subjected them to dangerous conditions.

Their complaint alleged housing transgender women — whom it calls “men” — along with the general female population ”creates a situation that incessantly violates the privacy of female inmates; endangers the physical and mental health of the female Plaintiffs and others, including prison staff; [and] increases the potential for rape.”

Their lawsuit took aim at regulations established in 2012 to protect transgender inmates from violence under the Prison Rape Elimination Act and a guidance memo — issued days before Obama left office — on how to handle transgender inmates. The memo noted that transgender prisoners face an "increased risk of suicide, mental health issues and victimization."

The rules said officials must give “serious consideration” to the wishes of transgender and intersex inmates when assigning facilities, while also instructing prison staff to “consider on a case-by-case basis whether a placement would ensure the inmate’s health and safety, and whether the placement would present management or security problems.”

The policy said a transgender person’s gender identity should also be taken into account when conducting searches, using pronouns, offering healthcare services, and supplying undergarments. The guidance also instructed officials to survey the transgender inmate population and issue an annual report on their condition.

On Friday, having evaluated those issues, the Bureau of Prisons issued the guidelines that instruct officials to “use biological sex as the initial determination for designation” for screening, housing, and offering programming services, saying the policy is “consistent with maintaining security and good order in Federal prisons.”

The new guidance also inserts the word “necessary” into a section of the manual on hormone and medical treatment, indicating the agency will make determinations about what sort of hormone therapies and other gender transition services are required.

Nancy Ayers, a spokesperson for the Bureau of Prisons, told BuzzFeed News the policy considers the needs of transgender inmates and other inmates in accordance with the Prison Rape Elimination Act regulation.

"The manual now addresses and articulates the balance of safety needs of transgender inmates as well as other inmates, including those with histories of trauma, privacy concerns, etc., on a case-by-case basis," she said.

The National Center for Transgender Equality, an advocacy group, condemned the move.

"The extreme rates of physical and sexual violence faced by transgender people in our nation’s prisons is a stain on the entire criminal justice system," said Mara Keisling, executive director of the NCTE. "Instead of leaving the existing policy alone, the administration is clearly prepared to encourage federal prisons to violate federal law and advance its own inhumane agenda.”