U.S. District Judge Tanya Chutkan issued an injunction on Friday that blocked a Trump administration policy which prevented undocumented teenagers being held in federal custody from undergoing abortions.

The injunction is preliminary and the government can appeal. Chutkan also certified a class action of other pregnant undocumented teens who are seeking abortions.

Last March, the Department of Health and Human Services’ Office of Refugee Resettlement said that federally funded shelters could not provide or facilitate abortion services without permission from office director Scott Lloyd. The government is being sued over this policy in the case Garza v Hargan.

Last month, the American Civil Liberties Union released the transcript of a December deposition of Lloyd, in which he admitted that he had not approved any abortions during his tenure, nor did he believe that undocumented minors had a Constitutional right to have an abortion. The ACLU has referred to the current policy as “cruel.”

Chutkan ruled in October and again in December that three pregnant undocumented teenagers, all of whom came to the United States illegally at age 17 and were being held in government-funded shelters, should be provided with abortions. The teen from the October decision, identified only as “Jane Doe,” eventually had an abortion after several appeals in various courts.

In the injunction, Chatkan said that the Office of Refugee Resettlement is denying the teenagers in federal custody “the right to make their own reproductive choices.” She also said that the plaintiffs suing the government have a “strong likelihood of success” in their case.

In October, Texas bishops criticized the decision to allow the teen to have an abortion. She was approximately 15 weeks pregnant at the time. Texas prohibits abortions after 20 weeks.