Soda lovers, rejoice! Just one day before New York City Mayor Michael Bloomberg’s ban on large sugary drinks was set to go into effect, a state Supreme Court judge on Monday blocked the measure, calling it “laden with exceptions based on economic and political concerns.”

The controversial ban would have prevented businesses such as restaurants, delis and movie theaters from selling sodas or other sugary drinks that were larger than 16 ounces. Proponents of the law argued that it would help to combat New York City’s climbing obesity rates and cut related medical costs.

But a group of restaurant and beverage industry groups—including the American Beverage Association and the National Restaurant Association—sued to block the measure, arguing that the city’s Board of Health had overstepped its bounds in passing it.

The groups contended that the ban exempted too many types of drinks—including alcohol- and milk-based beverages—to be truly effective. They also noted that the measure did not apply to businesses outside the health department’s jurisdiction, such as grocery and convenience stores.

New York Supreme Court Judge Milton Tingling took up that argument in his ruling when he found that the ban was “arbitrary and capricious,” because its loopholes “serve to gut the purpose of the rule.”

Tingling also agreed with the above-mentioned industry groups that the Board of Health exceeded its authority, writing that the board can regulate the city’s food supply only “when the city is facing eminent danger due to disease.”

In a press conference, Bloomberg called Tingling’s ruling “totally in error,” and vowed to continue his anti-obesity efforts.

For more InsideCounsel coverage of food- and drink-related lawsuits, see:

New York City grants three-month reprieve from sugary drink fines

New York mayor moves to ban sugary drinks, California cracks down on foie gras

Beverage industry groups sue to block NYC sugary drink ban

PETA sues California restaurant for violating foie gras ban

ABC news sued for defamation over “pink slime” reports

Cleveland judge strikes down law banning trans fats

Nutella settlement is sweet for plaintiffs’ attorneys