FILE - In this May 15, 2017 file photo, protesters wave signs and chant during a demonstration against President Donald Trump's revised travel ban outside a federal courthouse in Seattle. 9th U.S. Circuit Court of Appeals in San Francisco on Thursday, Sept. 7, 2017, rejected the Trump administration's limited view of who is allowed into the United States under the president's travel ban, saying grandparents, cousins and similarly close relations of people in the U.S. should not be prevented from coming to the country. (AP Photo/Ted S. Warren, File)

ONCE AGAIN, a federal court has ruled against the Trump administration's temporary ban on admission into the United States of refugees and citizens of six majority-Muslim countries. And once again, the Justice Department is appealing the ruling to the Supreme Court — this time arguing that the government should not have to exclude from the ban grandparents or other close family members of people within the United States, along with refugees sponsored by American resettlement organizations, while the case is pending before the court.

It's not clear what the Justice Department hopes to gain by appealing this injunction against Mr. Trump's executive order, as the Supreme Court was already set to hear arguments on the ban's legality on Oct. 10. What's more, a significant portion of the ban will likely have expired by that date — and the rest before the justices can even rule on the case.

Mr. Trump's order halts entry into the United States by citizens of the six banned countries for 90 days and suspends refugee admissions for 120 days. After courts blocked the ban, Mr. Trump clarified that these clocks would begin ticking as soon as the policy was allowed to go into effect. Because the Supreme Court lifted in part the lower-court injunctions against the order on June 26, the refugee ban will expire in late October, and the entry ban at the end of September.

As a matter of law, the Supreme Court can't rule on a case that no longer presents an ongoing issue. Yet the Justice Department hasn't given any indication of awareness that the court might well dismiss the case without deciding whether the ban is legal. Not only is the department now battling over an injunction on a policy that likely expires in two weeks, but its opening brief before the Supreme Court didn't even address the issue.

If the White House wants to keep the case alive, Mr. Trump could declare that the clock has yet to start with respect to those immigrants and refugees with "bona fide" connections to the United States, for whom the ban has remained on pause. Or he might extend the order on the grounds that the government has been unable to conduct reviews of vetting procedures — ostensibly what the halt in travel was meant to allow — without the ban fully in place. He could even issue a new ban or make the existing order permanent.

Yet the government's best option would be to allow time to run out on an executive order lacking in any security benefit to justify its cruelty. Permitting the ban to expire would let the administration save face while avoiding the risk of a damaging Supreme Court decision that could not only strike down the order but also place lasting constraints on presidential power over immigration and national security. Let's hope that, despite its choice to appeal the injunction, the Justice Department's silence on the ban's expiration is a sign that the government recognizes the opportunity to take the graceful way out.