(Reuters) - A federal judge in Washington issued an injunction on Friday preventing the Trump administration from interfering with the ability of undocumented teenagers in U.S. custody to have abortions or obtain abortion-related services.

U.S. District Judge Tanya Chutkan also certified a class action of similar minor children to challenge the administration’s policy.

The U.S. Department of Health and Human Services’(HHS) Office of Refugee Resettlement (“ORR”) had last March adopted a policy prohibiting federally funded shelters from taking “any action that facilitates” abortions without approval from its director.

But the judge said a preliminary injunction was appropriate while the matter is litigated because the plaintiffs had shown a “strong likelihood of success on the merits” of their claim that enforcing the policy would pose an unconstitutional “undue burden” on obtaining abortions.

Chutkan said ORR is “certainly entitled to maintain an interest in fetal life,” but cannot strip undocumented teenagers of “their right to make their own reproductive choices.”

The government can appeal.

HHS did not immediately respond to a request for comment after business hours.

Brigitte Amiri, a lawyer for the American Civil Liberties Union representing the teenagers, said: “It is a relief that the court blocked the Trump Administration’s cruel policy of interfering with and obstructing access to abortions for unaccompanied immigrant minors.”

Chutkan had in December ordered HHS to let two undocumented immigrants, both aged 17, in federal custody have abortions, but put her order on hold to allow a government appeal.

According to court papers, several hundred pregnant undocumented teenagers have been in U.S. custody in each of the last four years.

The case is Garza v Hargan, U.S. District Court, District of Columbia, No. 17-02122.