A judge in New York on Monday blocked city mayor Michael Bloomberg's planned ban on giant sodas, just a few hours before restrictions on the sale of such drinks were due to come into effect.
Judge Milton Tingling ruled that the measures to restrict soda servings to a maximum of 16 ounces (470 milliliters) in fast-food and other restaurants, was an "arbitrary" measure and he was barring the plan "permanently."
The mayor responded immediately on Twitter, saying he planned "to appeal the sugary drinks decision as soon as possible, and we are confident the measure will ultimately be upheld."
"We believe @nycHealthy has the legal authority and responsibility to tackle causes of the obesity epidemic, which kills 5,000 NYers a year."
Bloomberg, who has made public health a key plank of his administration, banning smoking in restaurants, bars and most lately parks and beaches, was due to speak on the court decision later Monday.
But his super-sized soda ban sparked a stormy debate, with petitions and media campaigns from both sides.
Some supported Bloomberg's arguments, emphasizing that 30 years ago the average soda serving was just six ounces, but that these days, it's not rare to see young Americans with giant sodas that are more than a liter (33 ounces).
Opinion polls over the summer, however, indicated that a majority of New Yorkers opposed the limited ban, with some suggesting the mayor was impinging on civil liberties and others arguing the rules would not be effective.
Industry lobby groups led by the American Beverage Association and the National Restaurant Association took the city to court over the measure.
As well as the thousands who die each year from obesity-linked problems, one in eight adult New Yorkers has diabetes, which can be aggravated by sugar consumption, and studies have shown that sodas, which often cost less than bottled water, contribute to the problem.
"Sugary drink consumption is a key driver of the obesity epidemic in the US and in New York. And it is an epidemic," Bloomberg had said when promoting the ban.
The New York Board of Health approved the measures last September and they were due to come into force on Tuesday in restaurants and places of public entertainment, such as stadiums.
In a boost for the soda limits, the newly-built basketball stadium for the Brooklyn Nets had said it would immediately adopt the rules.
But under the measures put forward by the city there was nothing to stop people from buying as much soda as they like by refilling smaller containers.
Also, the ban did not extend to drinks sold in supermarkets or any dairy or fruit drinks, many of which also contain huge quantities of sugar.
Diet and alcoholic drinks were also exempted under the city's plan.
"The exclusion of all alcoholic beverages from the ban is completely irrational. Beer and soda have nearly the same calories per ounce," the plaintiff's complaint said.
"The application of the ban to some business establishments but not others is arbitrary and capricious," it argued.
Bloomberg had acknowledged the measure would fall short of ending over-indulgence of sugary drinks, but he said the disappearance of mega-sized cups would at least make people more aware of what they were consuming.