NEW YORK — A judge struck down New York City’s pioneering ban on big sugary drinks Monday just hours before it was supposed to take effect, handing a defeat to health-minded Mayor Michael Bloomberg and creating confusion for restaurants that had already ordered smaller cups and changed their menus.
State Supreme Court Justice Milton Tingling said the 16-ounce limit on sodas and other sweet drinks arbitrarily applies to only some sugary beverages and some places that sell them.
‘‘The loopholes in this rule effectively defeat the stated purpose of this rule,’’ Tingling wrote in a victory for the beverage industry, restaurants, and other business groups that called the rule unfair and wrong-headed.
In addition, the judge said the Bloomberg-appointed Board of Health intruded on City Council’s authority when it imposed the rule.
The city vowed to appeal the ruling, issued by New York state’s trial-level court.
‘The loopholes in this rule effectively defeat the stated purpose.’
‘‘We believe the judge is totally in error in how he interpreted the law and we are confident we will win on appeal,’’ Bloomberg said. He added, ‘‘One of the cases we will make is that people are dying every day. This is not a joke. Five thousand people die of obesity every day in America.’’
For now, though, the ruling means the ax won’t fall Tuesday on supersized sodas, sweetened teas, and other high-sugar beverages in restaurants, movie theaters, corner delis, and sports arenas.
‘‘The court ruling provides a sigh of relief to New Yorkers and thousands of small businesses in New York City that would have been harmed by this arbitrary and unpopular ban,’’ the American Beverage Association and other opponents said, adding that the group is open to other solutions with “a meaningful and lasting impact.’’
The city expressed confidence it would win on appeal.
‘‘This measure is part of the city’s multipronged effort to combat the growing obesity epidemic, which takes the lives of more than 5,000 New Yorkers every year, and we believe the Board of Health has the legal authority — and responsibility — to tackle its leading causes,’’ said Michael Cardozo, the city’s corporation counsel.
The first of its kind in the country, the restriction has sparked reaction from city streets to late-night talk shows, celebrated by some as a bold attempt to improve people’s health and derided by others as another ‘‘nanny state’’ law from Bloomberg during his 11 years in office.
The city has compelled chain restaurants to post calorie counts, barred artificial trans fats in restaurant food, and prodded food manufacturers to use less salt. The city has successfully defended some of those initiatives in court.
Because of the limits of city authority and exemptions made for other reasons, the ban would not cover alcoholic drinks or many lattes and other milk-based concoctions, and it doesn’t apply at supermarkets or many convenience stores — including 7-Eleven, home of the Big Gulp.
The rule, if upheld, would create an ‘‘administrative leviathan,’’ warned Tingling.