A federal judge said Friday that the Centers for Disease Control and Prevention can’t enforce its rules for coronavirus-era sailing against cruise ships in Florida starting July 18.

The decision was hailed by Florida Gov. Ron DeSantis (R) — who filed suit against the public health agency in April — as a “major victory.”

“The CDC has been wrong all along, and they knew it,” DeSantis said in a statement, alleging that the agency was trying to “sink” the industry. “Today, we are securing this victory for Florida families, for the cruise industry, and for every state that wants to preserve its rights in the face of unprecedented federal overreach.”

Under the 124-page ruling from U.S. District Judge Steven Merryday, the CDC’s conditional sailing order will become a “non-binding ‘consideration,’ ‘recommendation’ or ‘guideline’ ” when applied to Florida sailings on July 18.

As part of its conditional sailing order, the CDC says operators can sail quickly if 95 percent of crew and passengers are vaccinated. If not, the agency requires cruise lines to take volunteers on “test” cruises to show they can mitigate the risks of the coronavirus.