NEW YORK --A judge on Monday invalidated New York City's plan to ban large sugary drinks from restaurants, movie theaters and other establishments, 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.

New York City said it would appeal the ruling.

"We plan to appeal the decision as soon as possible, and we are confident the Board of Health's decision will ultimately be upheld," Michael Cardozo, lawyer with the city's Corporation Counsel, said in a statement.

The ruling was a blow to Mayor Michael Bloomberg, who had touted the ban as a way to address what he has termed an obesity "epidemic." But beverage manufacturers and business groups had called the law an illegal overreach that would infringe upon consumers' personal liberty.

A spokesman for Bloomberg's office was not immediately available for comment.

The ban had 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.

Bloomberg has made improving the health of New Yorkers part of his legacy. The soda ban had followed similar crackdowns on fat, sugar and salt and a smoking ban that has been replicated around the world.

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 that 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.

Companies like Coca-Cola, PepsiCo and McDonald's 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.