Trump administration officials will no longer be able to block undocumented immigrant teenagers in federal custody from getting abortions, thanks to a court order issued by a federal judge Friday night.

U.S. District Judge Tanya Chutkan issued the preliminary injunction against the Office of Refugee Resettlement, an agency that handles all minors who enter the United States without authorization and without their parents, after four teenagers sued the agency alleging it refused to allow them to get abortions. Under the injunction, ORR officials are forbidden from interfering with pregnant minors’ access to abortion counseling and care, including the procedure itself, while they are in the agency’s custody. Officials also cannot force the minors to tell their parents — or anyone else — about their decisions to get abortions.

"While ORR and its Director are certainly entitled to maintain an interest in fetal life, and even to prefer that pregnant UCs in ORR custody choose one course over the other,” Chutkan wrote in the ruling, “ORR may not create or implement any policy that strips UCs of their right to make their own reproductive choices.” (UCs, or “unaccompanied children,” is a technical term for minors in ORR’s care.)

ORR’s director, Scott Lloyd, is a longtime opponent of abortion. In a December deposition with the American Civil Liberties Union, which has represented the four teens in court, Lloyd said that agency policy mandates that he personally approve every request for an abortion by a minor in ORR’s custody. However, former ORR Director Bob Carey told VICE News that he interpreted the policy differently, judging only whether federal funds would be used to pay for the abortions, not whether or not the teen could have one at all. (Legally, federal money can only be used to help pay for abortions if a pregnancy is the result of rape or incest, or if a pregnancy threatens the mother’s life.)

“I think that’s quite different, though, than signing off on the right of an individual to have a procedure,” Carey said.

Between March and December 2017, Lloyd received seven requests for abortions, records show. He refused to grant a single one, including the request of a teen who became pregnant after she was raped. He also met personally with at least one teenager who was considering abortion. And in March, Lloyd talked with ORR officials about trying to “reverse” one minor’s medication abortion, despite the fact that the abortion was already underway.

Brigitte Amiri, senior staff attorney for the ACLU’s Reproductive Freedom Project, called Friday’s ruling “a complete victory.”

“Scott Lloyd — and all of his staff and the people above him and below him — are prohibited from obstructing interfering with access to abortion. The order is very clear,” Amiri said. “It should put an end to the cruel coercion attempts and obstruction attempts by Scott Lloyd.”