Updated

An appeals court on Thursday temporarily stayed a judge's ruling that would have allowed a pregnant 17-year-old being held in a Texas facility for unaccompanied immigrant children to obtain an abortion.

The U.S. Court of Appeals for the District of Columbia issued a short ruling allowing the teenager to be taken to a counseling meeting with the doctor who would perform the abortion. Texas state law requires women to receive counseling 24 hours before an abortion.

If the appeals court lifts the stay during a hearing Friday morning, the teen would still potentially be able to have the procedure later Friday or on Saturday.

Susan Hays, legal director for the Texas group Jane's Due Process, which helps pregnant minors obtain an abortion, said the teen was receiving counseling Thursday morning.

The U.S. Department of Health and Human Services filed an appeal Wednesday night shortly after U.S. District Judge Tanya Chutkan ruled in favor of the teenager.

The teen, whose name and country of origin have been withheld because she's a minor, has already received a state court order permitting her to have the abortion. But federal officials have refused to transport her or temporarily release her so that others can take her to have the procedure.

She is being held at a facility in Texas administered under a contract from the U.S. Department of Health and Human Services, which is responsible for sheltering children who illegally enter the United States unaccompanied by a parent.

She's believed to be about 15 weeks pregnant. Texas law bans most abortions after the 20th week of pregnancy and requires women seeking an abortion to meet with the doctor who will perform the procedure a day beforehand. The state also requires minors to get the consent of a parent or obtain a waiver from a judge.

HHS argued to the appeals court that the department had adopted a policy of "refusing to facilitate abortions" except in "very limited circumstances." It said the teen could instead ask to be returned to her country of origin. Her lawyers have said she is from Central America and crossed into the United States in September.