A federal judge on Wednesday ordered Trump administration officials to stop blocking a pregnant 17-year-old immigrant from having an abortion while she's being detained in Texas after crossing the Mexican border illegally.

>> Read more trending news

After a hearing in her courtroom in Washington, D.C., U.S. District Judge Tanya Chutkan ordered administration officials to allow the teenager, identified only as Jane Doe, to be taken to an abortion clinic “promptly and without delay.”

Without court intervention, Chutkan wrote, Doe “will suffer irreparable injury in the form of, at a minimum, increased risk to her health, and perhaps the permanent inability to obtain a desired abortion to which she is legally entitled.”

Lawyers with the American Civil Liberties Union argued that Doe’s experience is part of a larger pattern by the Office of Refugee Resettlement, which under President Donald Trump has refused to allow unaccompanied minors to receive abortions, referring them instead to crisis pregnancy centers, which counsel women against abortions, often from a religious perspective.

Wednesday’s emergency order, however, applied only to Doe, and required federal officials to ensure that she can arrive as early as Thursday at an abortion clinic closest to the government-shelter where she’s being held.

“If transportation to the nearest abortion provider requires J.D. to travel past a border patrol checkpoint, Defendants are restrained from interfering with her ability to do so and are ordered to provide any documentation necessary for her to do so,” the judge wrote in the order.

Texas Attorney General Ken Paxton had asked Chutkan to deny the teen access to an abortion, arguing that crossing the border illegally does not provide immigrants with broad rights protected by the U.S. Constitution.

“No federal court has ever declared that unlawfully present aliens with no substantial ties to this country have a constitutional right to abortion on demand,” Paxton said.

Paxton made the same arguments last week when the ACLU asked a California judge to intercede on the teen’s behalf. That judge, however, ruled that the request did not belong in her court, prompting the ACLU to file a second emergency request in Washington.