The court also vacated sections of the lower court’s temporary restraining order, issued Wednesday, that forced the government to allow Doe to be transported to an abortion facility. The appeals court remanded the case to the district court and said that should HHS not be able to secure a sponsor, the order said the lower court could re-enter its temporary restraining order, and the government could then appeal again.

The ruling came just hours after the appeals court held oral argument on the case Friday morning. Judges Brett Kavanaugh and Karen Henderson, appointed by Presidents George W. Bush and Ronald Reagan, respectively, were in the majority. Judge Patricia Millett, appointed by President Barack Obama, dissented.

Millett wrote a scathing dissent, in which she said the government’s position was “wrong and unconstitutional.”

“The government’s refusal to release [Doe] from custody is not just a substantial obstacle; it is a full-on, unqualified denial of and flat prohibition on J.D.’s right to make her own reproductive choice.”

Millett wrote that contrary to its argument, the government is not facilitating the abortion. Doe will be transported to the procedure by her guardian, expenses will be paid by her guardian and attorneys, and paperwork and medical care will be provided by a government contractor.