The individual cases are part of a broader lawsuit challenging the government's new policy of discouraging, and even blocking, undocumented teens in custody from terminating pregnancies.
In her ruling Monday, U.S. District Judge Tanya S. Chutkan cited the need to "preserve [the teens'] constitutional right to decide whether to carry their pregnancies to term."
Both of the teens are 17. One is 10 weeks pregnant and the other is about 22 weeks pregnant.
If the government continues to block the teenagers' access to abortion, the judge wrote, they "will both suffer irreparable injury in the form of, at a minimum, increased risk to their health, and perhaps the permanent inability to obtain a desired abortion to which they are legally entitled."
The case in federal court in the District was initially brought by a Central American girl who was able to terminate her pregnancy in October following a high-profile legal battle over the policy that already was pending in the Supreme Court.
Chutkan, the same judge who ordered the government to step aside in the case of the first teen in October, put her Monday order on hold for 24 hours.
Since March, the Trump administration has refused to "facilitate" abortions for unaccompanied minors taken into federal custody after crossing the border illegally. The government says the minors have the option of voluntarily returning to their home countries or could be released to sponsors in the United States who presumably could help them end their pregnancies.
The Department of Health and Human Services, which is responsible for caring for detained unaccompanied minors, said in a statement after the new ruling, "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."
"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."
At a hearing earlier Monday, lawyers from the American Civil Liberties Union who are representing the two girls in the most recent instances said in court that the administration's new policy is an unconstitutional ban on abortion because it strips the teens of their right to make an independent decision about becoming a parent.
"They are in U.S. custody and being forced to continue their pregnancies against their will," said Brigitte Amiri, a senior staff attorney with the ACLU.
The court filings do not say where the two teens are being held. The teen in October was in custody in Texas.
Under the administration of President Barack Obama, the government did not pay for abortions for teens in custody except in cases of rape, incest or a threat to the woman's life. But officials did not block immigrants in U.S. custody from having abortions at their own expense.
In court filings, the government says it "has strong and constitutionally legitimate interests in promoting its interest in life, in refusing to facilitate abortion, and in not providing incentives for pregnant minors to illegally cross the border to obtain elective abortions while in federal custody."
The two sides in the cases dispute the number of teens affected by the policy. There were 420 pregnant girls in custody during fiscal 2017, court filings show, and 18 who requested abortions.
In the case of the first teen, the government missed the time window for trying to get an order from the Supreme Court to stop the abortion. In the Monday case, the Justice Department specifically asked Chutkan to put on hold any order in the new case to give the government sufficient time to appeal, and moved almost immediately to do that after she gave Justice a 24-hour window.
As the case of the two teens was heard Monday, the administration's request remained pending before the high court to dismiss the ACLU's broader challenge to the policy and to wipe out the judgment of the U.S. Court of Appeals for the D.C. Circuit that had allowed the procedure in October.
The administration also took the unusual step of asking the Supreme Court to consider disciplinary action against the girl's lawyers for what it says were misleading statements that meant the government did not move more quickly to seek a court order to stop the October abortion.
The girl's legal team has called the assertions about misleading statements "baseless" and said attorneys acted in the teen's best interests and fully complied with the law.
In the new court filings, ACLU attorneys say the two additional pregnant teens also have been prevented from accessing abortion services. One teen, identified as Jane Roe, is about 10 weeks pregnant and, after being counseled about her options, asked for an abortion.
The other, identified as Jane Poe, requested an abortion earlier this month after being told by her doctor that she is approaching the point in her pregnancy — now 22 weeks — after which she will no longer be able to obtain an abortion.
In response, government lawyers say the circumstances for the two teens are distinct from the October case.
The teen known as Jane Roe is in the final stages of obtaining a sponsor in the United States, according to the government, and a sponsor could take her to obtain an abortion after she is released from custody.
The second teen decided as recently as Dec. 4 that she did not want an abortion, and only last week changed her mind to proceed, according to the government.
Justice Department attorney August Flentje told the judge that the Office of Refugee Resettlement, which contracts with shelters to house the teens, has determined it is not in the "best interests" of the second teen to get an abortion in part because she struggled with the decision.