In the immediate aftermath of Friday's ruling, retailers and beverage industry groups lamented the setback, while health groups and county officials cheered. Cook County Circuit Judge Daniel Kubasiak also dissolved the temporary restraining order that had halted implementation of the tax, which originally had been set to take effect July 1 and applies to both sugar- and artificially sweetened drinks.

The tax is scheduled to go into effect Wednesday, according to Cook County Board President Toni Preckwinkle.

"We applaud today's decision. ... We believed all along that our ordinance was carefully drafted and met pertinent constitutional tests," Preckwinkle said in a emailed statement after the ruling.

It's not yet known whether the Illinois Retail Merchants Association will appeal the decision.

Rob Karr, president and CEO of the group, said his organization would consider its legal options, which include filing an appeal or an amended complaint.

"We are disappointed by today's ruling. ... I can only imagine the outrage that is being felt by consumers throughout Cook County who may soon have to pay this tax," Karr said.

The tax was championed by Preckwinkle and approved by commissioners last fall — one of several so-called soda taxes popping up in municipalities across the country. But last month, the merchants group sued the county, alleging the tax violates a clause in the state constitution requiring uniform taxation of products within a designated taxable class.

Reading a portion of his ruling, Kubasiak acknowledged he was aware of the county's "budgetary turmoil" as a result of the legal challenge, but said he wasn't "moved by its public airing of those matters." Ultimately, the judge determined that the tax was within the county's authority and did not violate the state constitution.

"The court is not charged with evaluating the progressive or regressive nature of this tax, or any tax. ... Rather those determinations rest with economists, the county's elected officials and those who ultimately bear the effect of the tax," Kubasiak said.

The county had been expecting the tax to bring in $67.5 million this year and $200.6 million in 2018. Earlier this month, Preckwinkle announced layoffs for 300 county workers in the absence of that revenue, though the layoffs have not begun.

It's unclear how many people will actually lose their jobs. In her statement, Preckwinkle said the county had lost at least $17 million in revenue because of the delay.

"Until we are able to fully implement and collect revenues from this tax, we will continue to review our financial position and make adjustments accordingly," she said.

Many retailers oppose the tax, which would apply to a wide variety of sugar- and artificially sweetened beverages. They've argued that, under the Illinois Constitution, similar objects should be taxed uniformly. Under the sweetened beverage tax, drinks in a bottle, or from a fountain machine, are taxable. But on-demand, custom-sweetened beverages, such as those mixed by a server or barista, or a hand-made Frappuccino, aren't subject to the tax.

Also exempt: purchases made with federal food stamp benefits through the Supplemental Nutrition Assistance Program, which are exempt from state and local sales taxes under federal law.

More generally, many retailers have fought the tax because it required them to make changes to their point-of-sale systems — a potentially costly undertaking for small stores — and adapt to numerous changes to regulations in recent months.

Potash Markets' three locations will be as ready as they can be to implement the tax when Cook County says go, said owner Art Potash. But it won't be easy.

"We have no problem complying, we comply with everything out there, but this is a very complex, difficult thing," he said, noting that he "strongly" opposes the tax.

The fight over Cook County's sweetened beverage tax in some ways mirrors what's happened in other states. The beverage industry has spent millions of dollars fighting similar taxes in cities like Philadelphia; Boulder, Colo.; and Berkeley, Calif. In Cook County, the American Beverage Association, the industry group representing companies like Coca-Cola and PepsiCo, is funding the Can the Tax coalition that is seeking to repeal the tax.

Meanwhile, organizations such as the American Heart Association, World Health Organization, Center for Science in the Public Interest and Illinois Public Health Institute have advocated the public health benefit of taxing sugary drinks, which are linked to obesity and related health conditions. The science is less clear, though, on whether artificially sweetened beverages have negative health consequences.

Mariano's spokesman Jim Hyland said the chain is ready to roll out the new tax.

"We do not expect a run on soda this evening as this subject is likely not top of mind for our customers due to the length of the legal proceedings over the last few weeks," Hyland said in an email.