Updated

An appeals court on Thursday halted a decision that would have allowed a pregnant illegal immigrant teen to get an abortion, just hours after a federal judge ordered the government to "promptly" take her to have the procedure.

The unidentified 17-year-old girl, who is being held at a Texas facility after she entered the U.S. illegally, is believed to be about 15 weeks pregnant. Texas state law bans most abortions if a woman is more than 20 weeks pregnant and require them to get counseling from a doctor 24 hours before the procedure. Minors are also usually required to obtain parental consent or a judge's waiver.

Another hearing is expected to occur Friday morning, in which the appeals court could lift the stay. The teenager can then still have the procedure on Friday or Saturday.

Judge Tanya Chutkan ordered on Wednesday to have the teenager transported to an abortion clinic “promptly and without delay.” The U.S. Court of Appeals for the District of Columbia then issued a short ruling that blocked the order after the U.S. Department of Health and Human Services filed an appeal.

The teen is still allowed to obtain counseling with a doctor who would perform the abortion. She received the counseling Thursday morning, Susan Hays, legal director for the Texas group Jane's Due Process, told The Associated Press.

Federal officials refused to transport the teen or temporarily release her from the facility to allow other people to take her to have the abortion on Wednesday. It’s unclear where she is originally from, but her lawyers said she is from Central America.

HHS argued to the appeals court the department had a policy of "refusing to facilitate abortions" except in "very limited circumstances." It also said the teenager could return to her country of origin to get the procedure.

The American Civil Liberties Union sued on behalf of the teen, arguing HHS was improperly preventing her from having the abortion and instead taking her to a crisis pregnancy center.

The Associated Press contributed to this report.