The U.S. Supreme Court June 4 threw out a lower court’s ruling that allowed a 17-year-old last year to obtain an abortion while she was in a detention center after an illegal border crossing.

If the Supreme Court had not acted, the lower court’s ruling could have set a precedent that would have allowed minors in similar situations to obtain abortions.

The legal battle began when the detained teenager had sought but was denied permission to leave the government-funded center where she was detained to obtain an abortion, saying she had been raped, found out she was pregnant during the detention and did not want to go through with the pregnancy.

The Trump administration objected to allowing her to leave the shelter temporarily for the purposes of obtaining an abortion, and said if she wanted an abortion, she could find a sponsor to get her out of detention or leave the country voluntarily.

But an October ruling by a federal judge in Washington said the government couldn’t interfere with the teenager’s access to doctors and such actions infringed on her constitutional rights. Immediately after that ruling, she was allowed to leave the shelter for what government lawyers believed was pre-abortion counseling but she obtained an abortion instead.

The Trump administration subsequently sought to have lawyers for the American Civil Liberties Union, who represented the 17-year-old, disciplined, saying they had misled the Justice Department about why she had left the shelter after the October ruling. But the Supreme Court did not seek disciplinary action.

The ACLU, meanwhile, is representing clients in similar situations and those cases will be allowed to move through the lower courts. While seeming to back the Trump administration, the high court’s June ruling is not a final say on whether immigrant minors in government detention can be allowed to obtain an abortion.

In October, the Texas Catholic Conference in Austin criticized the ACLU, saying no one should “facilitate and participate in ending the innocent life of the unborn child.”