New York City Mayor Michael Bloomberg's widely contested ban on large sugary beverages was shot down on Tuesday by a mid-level state appeals court, which ruled that the mayor and his health board had overstepped their authority.

A four-judge panel of the state Supreme Court Appellate Division ruled unanimously, saying that although the mayor's health board had the power to ban "inherently harmful" foods from being served to the public, soda and other sugary beverages didn't fall into that category. They also said that sodas were not harmful when consumed in moderation, ABC News reported.

The soda ban would have made it illegal for any businesses that receive NYC health-department grades to sell "sugary beverages" larger than 16 ounces. Because of this loophole, supermarkets, vending machine operators, and convenience stores, such as 7-Eleven, would still be allowed to sell large drinks.

This loophole was exactly the reason why the panel of judges ruled against the soda ban. 7-Eleven's 64-ounce Big Gulp would still be permitted for sale under the new law, according to Reuters. Additionally, the law made no mention of large milk-based drinks, such as milkshakes and Starbucks' Frappuccinos, which would have also exceeded the 25-calorie-per-eight-ounce statute.

"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," Christopher Gindlesperger, spokesman for the American Beverage Association, said. The association had been among a number of groups challenging Bloomberg's ban.

Bloomberg, however, was undeterred, and said that the ruling was only a "temporary setback," and that the administration plans to appeal the decision as it continues the "fight against the obesity epidemic." The appeal, however, would be his last chance to enact the NYC soda ban, since the case would end if the court decides it won't consider appeal.

He also mentioned that over 2,000 people had already died from diabetes in New York City since March 12, the day a court rejected the law, and one day before it was set to begin.

The soda ban became a subject of wide debate among city residents when Bloomberg first proposed it last year, Many people expressed disapproval, saying that the administration was overstepping its bounds, and trying to create a "nanny state."

"I don't think it's the government's job to ban people from doing things with a handful of exceptions," Bloomberg said last year. "But generally, it's government's job to tell you the facts of what is bad for you and let you make your own decision."

It seems the decision has been made.