HOUSTON — An appeals court says a federal judge must determine whether an immigrant teen in federal custody wants an abortion.

The 5th U.S. Circuit Court of Appeals on Thursday ordered a hearing after a dispute between the U.S. government and the teen’s court-appointed lawyers.

The ruling says the teen, a 14-year-old at a government facility in Texas, sought an abortion in January. A state judge appointed lawyers and set a hearing so she could obtain a waiver under Texas law requiring parental consent for an abortion.

But the government didn’t bring her to the hearing and instead provided what it said were handwritten notes indicating she didn’t want an abortion. The appointed lawyers weren’t allowed to meet with her.

Four other immigrant minors in government shelters have gone to court after their requests to have an abortion were denied.