The U.S. government is joining angry customers and businesses in railing against Cook County’s new penny-an-ounce sweetened beverage tax, threatening to withhold about $87 million in food-stamp funds from the state of Illinois if the county doesn’t change the manner in which the tax has been implemented.

The U.S. Department of Agriculture is objecting to how the tax is applied to purchases using food stamps, known as the Supplemental Nutrition Assistance Program. It says the county must take “immediate steps” to become compliant, adding no taxes can be collected until the problem is solved.

James T. Dimas, secretary of the Illinois Department of Human Services, informed Cook County Board President Toni Preckwinkle of the issue in a letter this week.

Dimas wrote to Preckwinkle, “FNS states that it will take action to suspend administrative funds to the State of Illinois unless corrective action is taken ($86.8 million last fiscal year). Please be advised that FNS powers against the State in this regard are substantial.”

Earlier this week, the Department of Agriculture’s Food and Nutrition Services, which runs SNAP, reached out to state officials because “The Food and Nutrition Act prohibits state or local sales tax from being collected on food purchased with SNAP benefits.”

Cook County officials told retailers that purchases made with food-stamp benefits are exempt from the soda tax. However, the county is allowing retailers to tax those purchases and provide refunds as a workaround for stores that haven’t been able to properly update their point-of-sale systems.

The Agriculture Department says that the refund system violates federal law.

“It is (Food and Nutrition Services’) strict interpretation that retailers may not charge the tax to SNAP recipients at any time and that providing an immediate subsequent refund at a customer service desk does not cure the problem or the violation of the law,” Dimas wrote to Preckwinkle.

In a statement, Cook County spokesman Frank Shuftan said the county was unaware the USDA considered the county’s regulation to be unacceptable, believing the USDA was considering the policy and would follow up with any concerns.

“At this time, we believe we are in compliance with existing SNAP rules,” Shuftan said. “We do however recognize that USDA’s powers against the state in this regard are substantial and we will work collaboratively with both the state and USDA to address USDA’s concerns.”

The tax went into effect on Aug. 2. It was originally slated to begin July 1 but was delayed by a lawsuit filed by the Illinois Retail Merchants Association, which was later dismissed by a Cook County judge. The merchants are appealing the judge’s decision.

Under the tax, sweetened drinks in a bottle, or from a fountain machine, are taxable. But on-demand, custom-sweetened beverages, such as those mixed by a server aren’t subject to the tax.

Contributing: Amanda Svachula, Associated Press