NEW YORK (AP) — A judge on Wednesday ordered the federal Bureau of Prisons to transfer two transgender women inmates back to federal women's prisons after they had been sent to men's facilities in the wake of President Donald Trump's executive order that truncated transgender protections.

U.S. District Judge Royce Lamberth in Washington issued a preliminary injunction after the women were added as plaintiffs in ongoing litigation over the impact of Trump’s executive order on transgender women in federal prisons.

Lamberth ordered the federal Bureau of Prisons to "immediately transfer" the two women – identified in court papers by the pseudonyms Rachel and Ellen Doe – back to women's facilities and said the agency must continue to provide them with hormone therapy treatment for gender dysphoria.

The women said in court papers that they were living in constant fear of sexual assault and other violence after being moved to male prisons. Male inmates repeatedly propositioned them for sex and male officers subjected them strip searches without female officers present, they said.

“The fact that they have already been transferred and, allegedly, have been abused at their new facilities can only strengthen their claims of irreparable harm,” Lamberth wrote.

A Bureau of Prisons spokesperson declined to comment.

The preliminary injunction is the latest in a series of rulings thwarting the agency’s efforts to comply with the executive order, which calls for housing transgender women in men’s prisons, and for halting gender-affirming medical care.

Lamberth, who was appointed by Republican President Ronald Reagan, previously blocked the bureau from transferring a dozen other transgender women inmates to men's prisons.

In a ruling last month, he order that their “housing status and medical care” remain as they were prior Inauguration Day, when the president signed the executive order. Separately, in January, a federal judge in Boston halted the transfer of another transgender women’s to a men’s prison.

At the time, Rachel and Ellen Doe were not plaintiffs to any lawsuit challenging Trump’s executive order and were not covered by Lamberth’s initial rulings.

In a court filing last month, a Trump administration official said that as of Feb. 20, there were 22 transgender women housed in federal women’s facilities. That’s about 1% of the nearly 2,200 transgender inmates the agency said it has in its custody.

With Lamberth’s order Wednesday, at least 15 people are now covered by orders blocking or reversing the moves.

Lamberth has yet to rule in a lawsuit filed last week by three other inmates – a transgender woman housed in a men’s prison and two transgender men housed in women’s prisons. They are challenging the executive order’s ban on gender-affirming hormone therapy and other care.