BROOKLYN - Mayor Michael Bloomberg is vowing to appeal a last-minute decision nixing his ban on oversized sugary drinks.

The mayor's groundbreaking attempt to combat obesity went flat after a state judge halted the rule just hours before it was set to take effect today. The judge said it was arbitrary and outside health regulators' control.

Many restaurants complain that they had already made a transition in cup sizes to comply with the law, which would have limited the sale of sodas and other sugar-laden drinks to no more than 16 ounces. Bloomberg is now urging businesses to comply with the rule anyway.

The controversial law would have applied to delis, restaurants and movie theaters, but most supermarkets and convenience stores would have been exempt.

The mayor's office plans to appeal the decision saying, "We strongly believe that in the end the courts will recognize the Board of Health's authority to regulate the sale of beverages that have virtually no nutritional value."