The Justice Department said Wednesday it will appeal a court ruling by a Florida judge that struck down the federal government’s order to wear masks while traveling, after the administration’s top public health officials insisted the mandate was still necessary “at this time.”

The move is unlikely to force masks back on travelers just yet. The legal fight could take weeks or even months to resolve, and the federal government has said it’s not currently enforcing the mandate, which was set to expire on May 3.

But the Biden administration’s announcement makes clear that it wants to fight the ruling to retain the power to mandate masks aboard planes, inside airports and other transportation hubs to prevent the spread of disease.

“It is CDC’s continuing assessment that at this time an order requiring masking in the indoor transportation corridor remains necessary for the public health… CDC believes this is a lawful order, well within CDC’s legal authority to protect public health,” the CDC wrote in a statement.

PHOTO: A sign reading, 'masks required in this area,' is seen as travelers prepare to check-in at the Miami International Airport, Feb. 1, 2021 in Miami, Fla. (Joe Raedle/Getty Images, FILE)

PHOTO: A sign reading, ‘masks required in this area,’ is seen as travelers prepare to check-in at the Miami International Airport, Feb. 1, 2021 in Miami, Fla. (Joe Raedle/Getty Images, FILE)

Earlier this month, the CDC had extended the mask mandate for an extra two weeks, saying it needed more time to assess a recent uptick in cases and citing the unique risks posed by travel. But that plan was tossed out Monday after a Trump-appointed judge declared the latest extension of the mandate unlawful and said the agency hadn’t gone through the proper administrative process.

MORE: Confusion, anger, elation: Demise of travel mask mandate divides Americans, again

While many travelers cheered the move, the decision injected uncertainty into Americans’ travel plans and sowed confusion. Some people even said they were mid-flight when their pilot announced masks were suddenly optional. An estimated 3% of Americans are immunocompromised and more vulnerable to complications of the virus, even if vaccinated. Also, children under age 5 remain ineligible for the vaccine.

“It wouldn’t bother me as much if the removal of the mask mandate had come from a medical source — someone with perhaps a medical degree or a career spent studying viruses, causes and cures,” said John Shepard, an Uber driver in Winter Haven, Florida, who says he is immunocompromised.

“But to me, this was just a political move by a Trump-appointed judge who wanted to score political points, and it’s putting millions of people at risk,” he added.

MORE: Biden reacts to judge striking down transportation mask mandate

Public health experts said it was possible the CDC was going to let the mandate lapse after May 3 anyway — if hospitalization numbers remained flat — but that it would want the power to reinstate it in the future.

“This change in policy sets a really challenging precedent for how public health is done in this country. A single judge overturning a mandate driven by public health professionals means that we’re unnecessarily putting many people at risk,” said John Brownstein, chief innovation officer at Boston Children’s Hospital and an ABC contributor.

The case is not a slam dunk for the administration. The next step is for the Justice Department to file its appeal with the 11th Circuit, and legal experts say it’s likely the decision will eventually end up with the Supreme Court, which has been skeptical in the past of federal powers related to the pandemic.

ABC News’ Miles Cohen and Douglas Vollmayer contributed to this report.

DOJ appealing ruling that struck down travel mask mandate originally appeared on abcnews.go.com