A federal appellate court has blocked a San Francisco city ordinance that would have required health warnings on advertisements for sodas and other sugar-sweetened drinks.

An en banc panel of the U.S. Court of Appeals for the Ninth Circuit on Thursday found that the city’s law compelled commercial speech and violated the First Amendment rights of the plaintiffs in the case, American Beverage Association, California Retailers Association, and California State Outdoor Advertising Association, who were represented by Latham & Watkins.