WASHINGTON — The Supreme Court ruled Monday in a case about a pregnant immigrant teen who obtained an abortion with the help of the American Civil Liberties Union, siding with the Trump administration and wiping away a lower court decision for the teen but rejecting a suggestion her lawyers should be disciplined.

The decision is about the teen's individual case and doesn't affect an ongoing class-action case about the ability of immigrant teens in government custody to obtain abortions, the ACLU said. The justices ruled in an unsigned opinion that vacating a lower court decision in favor of the teen, who had been in government custody after entering the country illegally, was the proper course because the case became moot after she obtained an abortion.

Government lawyers had complained to the Supreme Court that attorneys for the ACLU didn't alert them that the teen's abortion would take place earlier than expected. The administration said that deprived its lawyers of the chance to ask the Supreme Court to block the procedure, at least temporarily. The Trump administration told the court that discipline might be warranted against the teen's attorneys. The ACLU said its lawyers did nothing wrong.

The Supreme Court said it took the government's allegations "seriously" but the court declined to wade into the finger-pointing between the sides.

"Especially in fast-paced, emergency proceedings like those at issue here, it is critical that lawyers and courts alike be able to rely on one another's representations. On the other hand, lawyers also have ethical obligations to their clients and not all communications breakdowns constitute misconduct," the justices wrote in a 5-page opinion, adding that the court "need not delve into the factual disputes raised by the parties" in order to vacate the decision for the teen.

David Cole, national legal director of the ACLU, said in a statement that the organization was "gratified that the court rejected this extraordinary request" for sanctions. He said the "ACLU did what lawyers are supposed to do, namely, pursue the best interests of our clients."

Justice Department spokeswoman Kerri Kupec said in a statement that the department was pleased with the decision.

"The Supreme Court has repeatedly made clear that the federal government is not required to facilitate abortions for minors and may choose policies favoring life over abortion. We look forward to continuing to press the government's interest in the sanctity of life," she said.

The teen at the center of the case entered the U.S. illegally in September as a 17-year-old and was taken to a federally funded shelter in Texas for minors who enter the country without their parents. The unnamed teen, referred to as Jane Doe, learned while in custody that she was pregnant and sought an abortion. A state court gave her permission, but federal officials — citing a policy of refusing to facilitate abortions for pregnant minors in its shelters — refused to transport her or temporarily release her so that others could take her for the procedure.

The ACLU helped the teen sue the Trump administration, and after a federal appeals court sided with her, the government was preparing to ask the Supreme Court to step in and block the procedure, at least temporarily.

But the teen, allowed out of the shelter by court order, had an abortion first, about 12 hours after a court gave her the go-ahead. In response, the Trump administration, in a highly unusual filing with the Supreme Court, cried foul. The ACLU has defended its attorneys' actions, saying government lawyers made assumptions about the timing of the teen's abortion.

Even though Jane Doe was able to get an abortion, the lawsuit that began with her has continued and could return to the Supreme Court at some point. Scott Lloyd, the director of the Department of Health and Human Services' Office of Refugee Resettlement, which oversees shelters for unaccompanied immigrant minors, has said he believes teens in his agency's care have no constitutional right to abortion.

And since the Jane Doe case was filed, several other pregnant teens in his agency's care have come forward seeking abortions and been represented by the ACLU. In two cases, the young women were released from custody and able to seek the procedure on their own while in another case the teen, a 17-year-old rape victim, got a court order allowing her to obtain an abortion and the government stopped attempting to block the procedure.

In March, following a request from the ACLU, a judge barred the Trump administration from interfering with the ability of any pregnant immigrant teens in its custody to obtain abortions while a class action lawsuit against the administration goes forward.

U.S. District Judge Tanya Chutkan ordered the Trump administration to post notices in government-run shelters that tell pregnant women that they have a right to decide whether to have the baby or to end their pregnancy.

The government had asked an appeals court to put Chutkan's order on hold while it appeals. But on Monday, hours after the Supreme Court ruled, a three-judge panel of the U.S. Court of Appeals for the District of Columbia Circuit declined.

The court said oral arguments in the case will be held in September.

The Justice Department declined late Monday to comment on the appeals court's decision.