It was the last gulp for the legal battle that brewed over former Mayor Michael Bloomberg's ban on large sugary drinks.

Lawyers for the city and the American Beverage Association answered questions from judges on the New York Court of Appeals -- the state's top court -- who tested the arguments over whether the city's Board of Health had the power to limit the size of some sugary drinks sold by city establishments that get letter grades from the health department.

While the topic was about soda, the judges brought up regulations such as posting calorie counts, eliminating trans fats, requiring buildings to have window guards, while raising the possibility of empowering the city to outright ban cheeseburgers and pizza.

"Put aside the hype of what they're doing, what so revolutionary about it?"" Chief Judge Jonathan Lippman asked an attorney for the beverage group.

Meanwhile, Judge Victoria Graffeo pressed the city's lawyer on the limits of regulations to protect public health.

"It's not opening a Pandora's Box" for other products, she asked.

Bloomberg's "soda ban" -- now being carried by Mayor Bill de Blasio -- limits serving sizes for sugary drinks served at restaurants, delis, movie theaters, stadiums and fast-food joints. Lower courts struck down the regulation and Mayor Bill de Blasio has picked up the effort to defend it in court.

Richard Bess, the lawyer arguing for the American Beverage Association, said the city's Board of Health and the Department of Health and Mental Hygiene lacked the authority to push such a regulation.

"In addition to a fact that they overstepped their bounds as an administrative agency, the rule is also arbitrary and capricious," Bess said. "The establishment that it covers, it doesn't even cover the home of the Big Gulp."

Sara Haviva Mark, executive director of Columbia Law's Center for Constitutional Governance, a supporter of the soda rule, said the case is about the appropriate place to draw a line on regulation.

"To the city, it's 'OK, if we let you do this small thing, where does the line get drawn.' And to the American Beverage Association, 'are you asking us to draw a line at nothing,'" she said of the judge's questions.

Jim Copland, director for the Manhattan Institute's Center for Legal Policy, said the case will hinge on process.

"The city has got to follow the right process," he said. "At the end of the day, the courts are going to let the city make dumb regulations if it wants to, as long as its semi plausible."