The U.S. Court of Appeals for the D.C. Circuit ruled Tuesday that an undocumented teenager under federal custody in Texas can immedately have the abortion she requested, reversing a ruling issued Friday by a three-judge panel that blocked her from getting the procedure right away.

Days earlier, a three-judge panel from the appeals court ruled 2-1 that Jane Doe, as she is known in court filings, could not immediately have access to the abortion she requested. Instead, the federal government had until Oct. 31 to find a sponsor to take custody of the teen and transport her to an abortion clinic to have the procedure. Before that ruling was issued, Doe had an abortion scheduled for Friday afternoon that was ultimately canceled.

On Tuesday, the full 10-judge U.S. Court of Appeals for the D.C. Circuit reviewed Friday's ruling from the three-judge panel and chose to reinstate a Oct. 18 district court decision from U.S. District Judge Tanya S. Chutkan. That ruling, which the Trump administration appealed, had ordered the federal government to transport Doe to her abortion appointments "promptly and without delay" or allow her to be transported by someone else. 

Under Texas law, minors need their parents' permission or a court order to have an abortion. Doe originally received her court authorization on Sept. 25.

The Texas Tribune thanks its sponsors. Become one.

But the federal Department of Health and Human Services has not allowed Jane Doe to leave the shelter where she is living under federal custody in order to get the abortion she has requested. The Office of Refugee Resettlement – a sub-division of HHS that oversees the shelter – has also refused to transport the minor. Doe is 15 weeks pregnant, and Texas law only allows a woman to terminate a pregnancy before 20 weeks. Her attorneys have urged the court to allow Doe to get an abortion immediately, arguing that the procedure would be riskier as her pregnancy progresses.

For weeks, lawyers with the American Civil Liberties Union and the Trump administration have battled over the federal government's role in allowing Doe to have the procedure. The ACLU claims the federal government is forcing Doe to continue her pregnancy against her will while she has the constitutional right to an abortion.

The Trump administration has argued that the federal government is not required to facilitate an abortion for a minor in its custody and that Doe can seek the procedure in two other ways: going back to her home country or having her custody transferred to a sponsor that agrees to take her to an abortion clinic.

Doe's attorneys celebrated Tuesday's decision. "It's a huge victory to protect the constitutional right to abortion and to fight back against the Trump administration's attacks on reproductive rights and immigrants' rights," said Brigitte Amiri, senior staff attorney with the ACLU Reproductive Freedom Project, in an interview with the Texas Tribune.

Despite Tuesday's order, it's still not clear when Jane Doe will be able to have her abortion. Amiri said the ACLU is coordinating with a health care provider in the Rio Grande Valley to set up her next appointment. Under Texas law, she has to undergo counseling and a sonogram by the same physician that will perform the abortion 24 hours before the procedure. (Doe already underwent that counseling last week, but will have to go through it again since last week's ruling led to the cancellation of her abortion appointment.)

The federal government can still appeal the decision with the U.S. Supreme Court.

Some states have also weighed in on the legal battle. Texas is part of a 9 state coalition that filed an amicus brief with the U.S. Appeals Court defending the Trump administration's policy of preventing abortions for unaccompanied, undocumented minors. Thirteen other states filed a brief siding with the ACLU, arguing that because a state court already authorized the abortion, a federal agency cannot block the procedure "without infringing upon the sovereignty of those states."

Never miss a moment in Texas politics with our daily newsletter.