SAN FRANCISCO (AP) — A federal judge said Wednesday she doesn’t understand why federal officials don’t “step aside” and allow a pregnant 17-year-old being held in a Texas facility for unaccompanied immigrant children to get an abortion.

But U.S. Magistrate Judge Laurel Beeler also said during a hearing in San Francisco that she didn’t think the legal challenge on behalf of the girl by the American Civil Liberties Union of Northern California belonged in her courtroom.

READ MORE: Waxahachie Dad Shielded 5-Year-Old Daughter From Tornado Monday Night

Beeler noted that the girl — identified only as Jane Doe — had no connection to Northern California and said her case looked like a “whole new lawsuit tacked onto an existing one.”

The judge did not immediately issue a ruling on the ACLU’s request for a temporary restraining order that the girl be allowed to get an abortion.

The ACLU says the U.S. Department of Health and Human Services is refusing to let the girl be taken for the procedure. The girl may be up to 14 weeks’ pregnant, Rochelle Garza, a lawyer appointed to represent the girl’s legal interests, told The Associated Press on Tuesday.

Texas law prohibits most abortions after 20 weeks.

Beeler told an attorney for the U.S. Department of Justice, Peter Phipps, that the urgent situation was entirely of the government’s making. Private groups that support abortion rights have raised money for the procedure, Garza said. The girl’s attorney has agreed to transport her, according to Beeler.

“You’re not being asked to do anything,” the judge told Phipps. “You’re not being asked to spend money. You’re really not being asked to transport. You’re just really being asked to stay out of the way.”

READ MORE: Texas Senate Passes Constitutional Carry Bill

Phipps said the girl’s case was on a “shaky” procedural foundation. He said the government might propose having the case heard in Texas or Washington, D.C.

U.S. lawyers representing HHS have argued that the ACLU’s request for a temporary restraining order allowing an abortion to go forward was wrong on technical grounds, since the original lawsuit argued the agency was violating the Constitution by allowing religious groups to allegedly refuse access to abortion. In this case, the 17-year-old is not being held in a facility with a religious affiliation, government lawyers said.

Brigitte Amiri, an attorney for the ACLU, said she didn’t see the girl’s case as entirely new.

“In both scenarios, the federal government is acting unconstitutionally,” she said.

Texas Attorney General Ken Paxton, a strident opponent of abortion rights, argued in a separate court filing Tuesday that people in the U.S. illegally without some type of established ties to the country did not have a “constitutional right to an abortion on demand.”

If the court rules in the girl’s favor, “the ruling will create a right to abortion for anyone on earth who enters the U.S. illegally,” Paxton said in a statement. “And with that right, countless others undoubtedly would follow. Texas must not become a sanctuary state for abortions.”

MORE NEWS: 15-Year-Old In Custody For Shooting 17-Year-Old In Garland

Paxton was joined in filing the brief by the attorneys general of Louisiana, Missouri, Nebraska, Ohio, Oklahoma, and South Carolina.(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)