New York City Mayor Michael Bloomberg's ban on big soft drinks was just struck down by a Manhattan judge. How did we get here? Read our explainer.

So, what did the ban do?

Under Bloomberg's ban, "sugary beverages" larger than 16 ounces could not be sold at food-service establishments in New York City. At restaurants with self-service soda fountains, cups larger than 16 ounces could not be provided. Only outlets that get health-department grades were included, so supermarkets, vending machine operators and convenience stores (including 7-Eleven and its Big Gulps) didn't have to worry about the ban. There was no ban on refills. Failure to comply could have led to a $200 fine. It was set to take effect on Tuesday.

What is a sugary beverage, anyway?

According to the city, it's a drink with more than 25 calories per eight ounces, which has either been sweetened by the manufacturer or mixed with another caloric sweetener. The ban did not apply to pure fruit juice or fruit smoothies, drinks that are more than half milk, calorie-free diet sodas or alcoholic beverages. Milkshakes, if they were more than half milk or ice cream, were exempt. But sweetened coffee drinks, if less than half milk, were not. (Frappucinos were a source of confusion as late as last week.)

Why was it struck down?

The beverage industry took the city's New York City Department of Health and Mental Hygiene to court, arguing that the ban should have gone through the elected city council. State Supreme Court Justice Milton A. Tingling Jr. called the ban "arbitrary and capricious." The many exceptions, he said, are made on "suspect grounds" and lead to uneven enforcement. The loopholes, such as the refill issue, "defeat and/or serve to gut the purpose of the rule." He also expressed concern about the health department having a "virtually limitless authority," saying that Bloomberg's conception of its mandate would "create an administrative Leviathan." You can read the whole decision here.

What does this mean for Bloomberg?

It's a huge blow. Bloomberg's tenure as mayor will end this year. His new goal is to expand his reach nationally, using his money and fame to influence elections and drive the conversation.

“This is just the beginning,” Bloomberg aide Howard Wolfson told the Fix last fall. “On issues like guns and education, Mike Bloomberg is poised to play an even bigger role in advancing a mainstream agenda and influencing elections.”

While Bloomberg has been more aggressive nationally on guns, he was equally interested in seeing his anti-obesity initiatives exported.

“Everybody across this country should do it,” he proclaimed of the ban Monday morning. And it was a possibility. Lawmakers around the country -- including some in Washington, D.C. -- were watching the fight over the ban with interest.

Still, Bloomberg is a fighter with plenty of money, and he's hardly down for the count -- on public health or on his other pet causes.

Who wins? 

The beverage industry. (Other related industries, like the National Association of Theatre Owners, signed on to the case, so they win, too.) It's also a victory for the right. Many conservatives have railed against food restrictions and regulations in the past few years, in particular First Lady Michelle Obama's healthy eating campaign. The ruling is a boon for the conservatives, a blow against the "nanny state." Just look at the Drudge Report, where Bloomberg's face was splashed within minutes of the judge's ruling.

What happens now?

Bloomberg will appeal. "We plan to appeal the decision as soon as possible, and we are confident the Board of Health's decision will ultimately be upheld," an attorney with the city's Corporation Counsel, told Reuters. WonkBlog notes that after a court blocked Bloomberg's calorie labels, the city adjusted the regulations and got them approved.

The public opinion battle will go on. As Bloomberg told reporters in September when asked about the soda industry campaign, “I just spent roughly $600 million of my own money to try to stop the scourge of tobacco. I’m looking for another cause. How much were they spending again?”