WASHINGTON (Reuters) - A U.S. District Court judge ruled on Monday that President Donald Trump’s administration must allow access to abortion for two pregnant teenagers who are in the country illegally, escalating a high-profile legal fight.

Judge Tanya Chutkan put her order on hold, however, to give the U.S. Justice Department time to appeal her ruling.

The Justice Department filed its notice of appeal shortly afterward to the U.S. Court of Appeals for the District of Columbia Circuit.

The judge’s temporary restraining order marked the latest chapter in a legal dispute with the Trump administration over whether minors who are illegal immigrants have the right to seek an abortion during their detention.

The issue was ignited by a 17-year-old who petitioned the court in October to have an abortion, and ultimately had the procedure over the Trump administration’s objections.

In that instance, the U.S. Court of Appeals for the District of Columbia Circuit ruled on Oct. 24 that the teen could have an abortion immediately, rejecting the administration’s opposition.

The two 17-year-olds in the latest legal action, known to the court as Jane Roe and Jane Poe, requested abortions, but the U.S. Office of Refugee Resettlement has refused to allow them access to the procedure.

In her ruling, Chutkan wrote that the girls’ “constitutional right to decide whether to carry their pregnancies to term” needed to be preserved.

She also noted they were likely to succeed on the legal merits of their case, based on the prior ruling in the higher court.

“We are deeply disappointed in the decision to grant a temporary restraining order that will compel HHS to facilitate abortions for minors when they are not medically necessary,” a spokesman for the U.S. Department of Health and Human Services said in a statement.

“A pregnant minor who has entered the country illegally has the option to voluntarily depart to her home country or identify a suitable sponsor. HHS-funded facilities that provide temporary shelter and care for unaccompanied alien minors should not become way stations for these children to get taxpayer-facilitated abortions.”