The Justice Department said it’s prepared to appeal a ruling by a judge who struck down the Biden administration’s nationwide mask mandate on airplanes, trains and other public transportation, if health authorities say it’s necessary.

The department said it will appeal a federal judge’s ruling if the Centers for Disease Control and Prevention decides that masks should remain in place past the current assessment period, which is due to expire May 3.

“The department continues to believe that the order requiring masking in the transportation corridor is a valid exercise of the authority Congress has given CDC to protect the public health,” the Justice Department said in a statement Tuesday. “That is an important authority the department will continue to work to preserve.”

The department’s decision opens the door to protracted litigation that could create confusion for travelers in the months to come. Most U.S. airlines swiftly dropped their mask mandates for passengers following the Monday ruling, but some mass-transit operators have maintained the requirement.

The CDC put the policy in place in February 2021 to limit the spread of Covid-19.

The mask mandate was overturned by U.S. District Judge Kathryn Kimball Mizelle in Tampa, Florida, who ruled the CDC had exceeded its authority. It did so, the judge held, by incorrectly describing the requirement as a form of “sanitation.”

The CDC had argued that planes, trains and airports are unique disease vectors, with passengers often jammed up against one another for long stretches of time. Still, the agency extended the mandate by only 15 days last week, its shortest yet, and appeared poised to lift it if cases and hospitalizations driven by the BA.2 subvariant of the coronavirus—the pandemic’s latest threat—don’t surge.

Face mask requirements and other pandemic mandates became politically charged as Trump and Republican-led states accused Democrats of infringing the rights of Americans. The Biden administration has countered that masks and vaccines were crucial to fighting the virus, which has killed about 1 million Americans in the last two years.

“Wearing a mask cleans nothing,” Mizelle wrote in her ruling. “At most, it traps virus droplets. But it neither ‘sanitizes’ the person wearing the mask or ‘sanitizes’ the conveyance.”

The judge also found that the CDC had gone too far by issuing a regulation that “acts on individuals directly” rather than just their “property interests.”

The ruling was handed down in a lawsuit filed last year by the Health Freedom Defense Fund, a nonprofit group that says it focuses on “bodily autonomy” as a human right.