WASHINGTON — To Mayor Michael R. Bloomberg, it seemed like a sensible way to attack a major public health problem. To the soft drink industry, giant food companies, makers of snacks and candy, supermarkets, and antihunger groups, it seemed like an attack at the grocery checkout counter.

The mayor wants to reduce obesity and diabetes by banning the use of food stamps to buy “sugar-sweetened beverages” in New York City.

Food and beverage lobbyists see the mayor’s plan as a well-intentioned but misguided and paternalistic effort. They say it would create a logistical bottleneck at checkout counters and stigmatize poor people using food stamps.

They also fear that restrictions on soft drinks would set a precedent for the government to distinguish between good and bad foods and to ban the use of food stamps for other products — an issue sure to come up next year in the Congressional debate on a new farm bill.