Abortion rights supporters demonstrate outside the Department of Health and Human Services in October to protest the Trump administration’s efforts to block migrant teens in U.S. custody from getting abortions. (Michael S. Williamson/The Washington Post)

The Trump administration’s policy blocking abortion services for pregnant teenagers in immigration custody functions as “an across-the-board ban” on access to the procedure, a federal appeals court ruled Friday.

The 2-to-1 opinion from the U.S. Court of Appeals for the D.C. Circuit means the government will continue to be prevented from standing in the way of migrant teens who seek to end their pregnancies.

The American Civil Liberties Union initially brought the case on behalf of a 17-year-old girl from Central America held in a government-funded shelter in Texas. The government’s Office of Refugee Resettlement in 2017 had adopted a policy of refusing to “facilitate” abortions for teens in its custody who had crossed the border illegally.

In its 81-page ruling Friday, the court noted that under the policy, the former director of the office, E. Scott Lloyd, had to review individual abortion requests and had never approved one, including when the pregnancy resulted from rape. Even when one teen obtained private funding and transportation for the abortion, the director refused to let her leave the shelter to undergo the procedure.

“That is not a refusal to fund an abortion; it is a refusal to allow it,” the court said in an unsigned opinion joined by Judges Sri Srinivasan and Robert L. Wilkins.

Brigitte Amiri, the ACLU lawyer who argued the case, said dozens of young women have benefited because of the injunction the court upheld Friday that protects access. Amiri’s colleagues receive one to three calls each week, she said, from teens in shelters seeking information about abortion services.

“It’s a tremendous relief that the government will continue to be prohibited from blocking access to critical care for unaccompanied minors,” she said.

A Justice Department spokesman declined to comment.

In fiscal 2018, almost 50,000 unaccompanied minors were referred to the Office of Refugee Resettlement , and each year the office has several hundred pregnant minors in its custody.

The case attracted broad attention with its explosive mix of abortion and immigration policies and because of the previous involvement of Supreme Court Justice Brett M. Kavanaugh while he was on the D.C. Circuit.

Last March, a federal judge in Washington issued a nationwide order that prevented the government from interfering with access to abortion services. Justice Department lawyers had asked the appeals court to reverse the order, saying the government should not have to “facilitate the termination of life through abortion.”

The court rejected the government’s argument that the teens could always voluntarily return to their home countries to terminate their pregnancies, in part because the teens would need sign-off from the U.S. government. “Voluntary departure, then, is not a freely available escape hatch from a government veto on abortion,” the majority said Friday. “It is instead a second government veto.”

In addition, the court noted that the teens were unlikely to be able to obtain abortions in their home countries, because most minors in custody come from Honduras, Guatemala or El Salvador. “Abortion is criminalized in all three countries,” the court said.

The government lawyers also asked the appeals court for leeway to consider the circumstances of each individual teen in custody instead of allowing the case to move forward as an official class or group of litigants.

In his dissent, Judge Laurence H. Silberman said the class certified by the court “is much too broad; it should not include pregnant minors who do not wish an abortion.”

Those challenging the policy “contend that all pregnant minors — whether or not they want an abortion — are really aligned with the class representatives because the relevant constitutional right in their view is the right to choose whether or not to have an abortion,” Silberman wrote. “I think that confuses a political slogan with a constitutional right.”

The Trump administration’s policy departed from that of the Obama administration, which did not block migrants in U.S. custody from having abortions at their own expense.

Kavanaugh was on an earlier panel of appeals-court judges reviewing the case when it first reached the D.C. Circuit. The case was repeatedly cited during his nomination battle by abortion rights advocates as evidence that Kavanaugh would allow more restrictions on abortion than the justice he replaced, Anthony M. Kennedy.

When the case initially was on appeal before the full court in October 2017, Kavanaugh’s colleagues reversed his order that would have delayed a teen’s access to abortion services. Srinivasan and Wilkins voted with the majority to allow immediate access. Kavanaugh dissented.