Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

How sweet it is -- for New York City restaurants, delis, movie theaters and other establishments selling sugary beverages anyway.

A judge on Monday invalidated New York City's plan to ban large sugary drinks, one day before the new law was to take effect.

State Supreme Court Justice Milton Tingling in Manhattan ruled the new regulation was "arbitrary and capricious" and declared it invalid, after the American Beverage Association and other business groups had sued the city challenging the ban.

Bottom line, Tingling ruled, New York City Mayor Michael Bloomberg and the city's Board of Health did not have the authority to issue the soda ban.

At a press conference Monday evening, Bloomberg decried the judge's ruling and vowed to appeal.

UPDATE: The City of New York on Tuesday officially appealed the decision.

"We think the judge is totally in error in the way he interpreted the law and we're very confident that we will win on appeal," he said.

Touting New York City public health policies from the last decade -- from banning trans fats to requiring chain restaurants to post calorie counts -- Bloomberg emphasized that the large sugary beverage rule is about saving lives.

"As far as we have come, there is one public health crisis that has grown worse and worse over the years, and that is obesity," he said. "Five thousand people will die of obesity this year in New York. The best science tells us that sugary drinks are a cause of obesity."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Beverage manufacturers and business groups had called the law an illegal overreach that would infringe upon consumers' personal liberty.

In his 37-page ruling, Judge Tingling agreed with the special interest groups, saying that the sugary drink ban “would create an administrative Leviathan and violate the separation of powers doctrine.”

The ban would have prohibited the city's food-service businesses from selling sugary drinks larger than 16 ounces, though city officials had said they would not begin imposing $200 fines on offending businesses until June. The city will place that policy on hold pending the appeal.

Companies like Coca-Cola, PepsiCo and McDonald's Corp. had argued that the ban was inconsistent in its application, since it would still permit grocery and convenience stores to sell the drinks in any size.

Judge Tingling further noted that sweet alcoholic beverages were exempt, as was soy milk, although almond, rice and hemp drinks fell under the rule. And the infamous Big Gulp was exempt because it is sold by 7-Eleven, which as a convenience store does not fall under the jurisdiction of the Board of Health.

The American Beverage Association released this statement following the ruling:

“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. With this ruling behind us, we look forward to collaborating with city leaders on solutions that will have a meaningful and lasting impact on the people of New York City.”

Matthew Greller of the National Association of Theatre Owners of New York State wrote that the issue was “never about obesity, nor about soda.”

“This was all about power,” Greller said. “Greater education, awareness and collaboration with all the stakeholders will make a far greater impact than any unpopular and unfair executive decree.”

Although Judge Tingling’s ruling sides with the special interest groups, it acknowledges at length that obesity has been a problem in New York, responsible for about $4 billion in direct medical costs – of which tax payers pay for about 60 percent.

"The Board of Health does not limit anyone’s consumption, it just requires them to think about whether they really want more than 16 ounces,” Bloomberg said. “Remember that for many years, the standard soda size was 6 ounces, then it became 12 and people thought that was huge.”

In anticipation of the soda ban, Bloomberg on Monday released new data tying sugary drinks to the city's fattest neighborhoods. The new city study showed nine of the neighborhoods with the 10 highest obesity rates were also the highest in sugary drink consumption. At the other end, the three least obese neighborhoods were also the lowest in sugary drink consumption.

At the press conference, Bloomberg repeated that those most impacted are in poor neighborhoods.

“There’s no question that empty calories contribute to the problem,” Bloomberg said at Monday’s press conference. “It’s much worse in poorer neighborhoods. This is the science, we have to do something about it.”

Reuters contributed to this report.