ST. PETERSBURG, Fla. (AP) — A federal judge in Florida has voided the national mask mandate covering airplanes and other public transportation as exceeding the authority of U.S. health officials in the coronavirus pandemic.

The decision Monday by U.S. District Judge Kathryn Kimball Mizelle in Tampa, an appointee of former President Donald Trump, also said the Centers for Disease Control and Prevention improperly failed to justify its decision and did not follow proper rulemaking.

In her 59-page ruling, Mizelle said the only remedy was to vacate the rule entirely across the country because it would be impossible to end it for the limited group of people who objected in the lawsuit.

The judge said “a limited remedy would be no remedy at all” and that the courts have full authority to make a decision such as this — even if the goals of the CDC in fighting the virus are laudable.

“Because our system does not permit agencies to act unlawfully even in pursuit of desirable ends, the court declares unlawful and vacates the mask mandate,” she wrote.

The Justice Department declined to comment Monday when asked if the government planned to appeal the ruling.

Republican Florida Gov. Ron DeSantis, who was not directly involved in the case but has battled against many government coronavirus requirements, praised the ruling in statement on Twitter.

“Great to see a federal judge in Florida follow the law and reject the Biden transportation mask mandate. Both airline employees and passengers deserve to have this misery end,” DeSantis tweeted.

The CDC recently extended the mask mandate, which was set to expire Monday, until May 3 to allow more time to study the BA.2 omicron subvariant of the coronavirus that is now responsible for the vast majority of cases in the U.S.

The mask requirement for travelers was the target of months of lobbying from the airlines, which sought to kill it. The carriers argued that effective air filters on modern planes make transmission of the virus during a flight highly unlikely. Republicans in Congress also fought to kill the mandate.

Critics have seized on the fact that states have rolled back rules requiring masks in restaurants, stores and other indoor settings, and yet COVID-19 cases have fallen sharply since the omicron variant peaked in mid-January.

There have been a series of violent incidents on aircraft that have mainly been attributed to disputes over the mask-wearing requirements.

The lawsuit was filed in July 2021 by two plaintiffs and the Health Freedom Defense Fund, described in the judge’s order as a nonprofit group that “opposes laws and regulations that force individuals to submit to the administration of medical products, procedures and devices against their will.”

Chicago-based United Airlines announced in a statement Monday evening that masks are no longer required on their domestic flights, but may remain being required on some international flights.

“Effective immediately, masks are no longer required at United on domestic flights, select international flights (dependent upon the arrival country’s mask requirements) or at U.S. airports.

“While this means that our employees are no longer required to wear a mask – and no longer have to enforce a mask requirement for most of the flying public – they will be able to wear masks if they choose to do so, as the CDC continues to strongly recommend wearing a mask on public transit. We will continue to closely monitor the situation in the event of changes,” the company said.

Delta Airlines, Southwest Airlines and Amtrak are implementing the same guidance.

“Due to today’s court ruling, effective immediately, TSA will no longer enforce its Security Directives and Emergency Amendment requiring mask use on public transportation and transportation hubs. TSA will also rescind the new Security Directives that were scheduled to take effect tomorrow. CDC continues to recommend that people wear masks in indoor public transportation settings at this time,” the TSA said.

Read the full order below.