An undocumented teenager in federal custody has cleared a major hurdle in her fight to get an abortion, a right that the Trump administration has attempted to deny.

The US District Court of Appeals in Washington, DC, ruled that the US government is required to allow the 17-year-old to leave the facility she’s being kept at after crossing the US-Mexico border last month order to get an abortion. The 17-year-old is approximately 15 weeks pregnant, and is being represented by the American Civil Liberties Union (ACLU).

“Every step of the way, the Trump administration has shown their true colours in this case. It’s clear that their anti-woman, anti-abortion agenda is unchecked by basic decency or even the bounds of law,” Brigitte Amiri, a senior staff attorney with the ACLU Reproductive Freedom Project, said in a statement. “No one should have to go to court to get a safe, legal abortion.”

The young girl will now be able to get the abortion, unless the Trump administration decides to attempt to appeal the latest decision to the Supreme Court, which would have the final say if it chooses to hear the case.

The appeals court decision follows nearly a week after the ACLU first filed on behalf of the young woman, who is an unaccompanied minor currently being held in Texas at a federally funded shelter. After seeking out and being assigned a legal guardian — guardian approval is required for minors to get abortions in Texas — the government continued to refuse to transport, or allow anyone else to transport, her to an abortion facility.

“They are holding her hostage to ensure that she does not have an abortion, but rather continues the pregnancy, and has a baby, against her will,” the ACLU complaint reads.

People strike across America for A Day Without Immigrants Show all 16 1 /16 People strike across America for A Day Without Immigrants People strike across America for A Day Without Immigrants Demonstrators march during the "Day Without Immigrants" protest in Chicago, Illinois, February 16, 2017. Theopolis Waters/Reuters People strike across America for A Day Without Immigrants Demonstrators march during the "Day Without Immigrants" protest in Washington, DC, U.S., February 16, 2017. Aaron P. Bernstein/Reuters People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. The crowd, which grew to well over a thousand participants, marched from the Austin City Hall to the Texas State Capital. Across the country hundreds of restaurants and eateries are closing for the day to protest President Trump's immigration policies and to highlight the contributions of immigrants to U.S. business and life. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants AUSTIN, TX - FEBRUARY 16: Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Demonstrators march during the "Day Without Immigrants" protest in Chicago, Illinois, February 16, 2017. Theopolis Waters/Reuters People strike across America for A Day Without Immigrants Demonstrators march during the "Day Without Immigrants" protest in Chicago, Illinois, February 16, 2017. Aaron P. Bernstein/Reuters People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. The crowd, which grew to well over a thousand participants, marched from the Austin City Hall to the Texas State Capital. Across the country hundreds of restaurants and eateries are closing for the day to protest President Trump's immigration policies and to highlight the contributions of immigrants to U.S. business and life. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. The crowd, which grew to well over a thousand participants marched from the Austin City Hall to the Texas State Capital. Across the country hundreds of restaurants and eateries are closing for the day to protest President Trump's immigration policies and to highlight the contributions of immigrants to U.S. business and life. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants High school student Kathia Suarez holds up a sign as she protests with others outside the Grayson County courthouse in downtown Sherman, Texas, Thursday, Feb. 16, 2017. LM Otero/AP People strike across America for A Day Without Immigrants High school senior Vicky Sosa holds a sign outside the Grayson County courthouse in downtown Sherman, Texas, Thursday, Feb. 16, 2017. In an action called "A Day Without Immigrants," immigrants across the country are expected to stay home from school, work and close businesses to show how critical they are to the U.S. economy and way of life. LM Otero/AP

The Justice Department argued that it was not required to pay for and transport Ms Doe for an abortion, and said that the US government has a “significant and legitimate interest in refusing” to be complicit in the abortion.

Ms Doe’s right to an abortion was first upheld last week when US District Judge Tanya Chutkan ordered it so, but that decision was immediately appealed by the Justice Department, sending it to a three-judge panel with the DC court of appeals. Those judges ruled two-to-one to put a hold on the abortion, and instead sought for a sponsor who could take custody of Jane Doe, and she would be free to get an abortion at that point.

The ACLU then filed an emergency motion asking all of the DC court to consider the case, leading to Tuesdays ruling. A majority of the full court then voted to reinstate the Chutkan order from last week.

That majority in the court did not issue an opinion, but most pointed to the dissenting opinion from the three-judge panel decision they were considering.