Berkeley, California, became the first U.S. city to pass a tax on sugary drinks Tuesday, but the details of the tax leave a gaping loophole. If implemented as designed, the area's beverage distributors, restaurants and stores may raise prices on products like diet soda, milk or even snacks to offset the cost of paying a tax on sugar-sweetened beverages.

The tax as written would be levied starting Jan. 1 against the first distributor within city limits. If, for instance, a store bought soda from a supplier outside the city, the store would be taxed. But the tax doesn’t apply to small businesses, those with annual revenues under $100,000. At nonexempt stores, the price of a 20-ounce Coca-Cola would go up by a dime if the store chooses not to distribute the costs of the tax across other items.

“The proponents scoffed at the notion of a consumer spending 50 cents in gas to save 10 cents on a can of soda,” said Roger Salazar, spokesperson for Berkeley’s anti-tax campaign. “But they would drive a few blocks to save $1.20 on a 12-pack.”

Three-quarters of voters in the city of 100,000, known for its far-left politics, approved the tax. It applies to soda, energy drinks, sports drinks, sweet teas and syrups used in coffee—pretty much any sugar-sweetened beverage with some exceptions for diet soda, chocolate milk, 100 percent juice drinks, some coffee drinks and alcoholic beverages.

The nation's first soda tax comes at a time when Americans are gradually consuming less soda but more sugary energy drinks, coffee and artisanal fizzy beverages. Sales of carbonated soft drinks have declined by 1-2 percent each year for decades while coffee, bottled water, energy drinks and ready-to-drink teas are gaining popularity.

A similar tax proposal in San Francisco needed a two-thirds majority and failed to pass, though a majority of voters supported it. San Francisco’s soda tax revenue would have gone to school nutrition, public education and fitness programs, but Berkeley’s tax revenue will go into the city’s general fund.

Berkeley’s Measure D passed after a heavy campaign battle. The beverage industry spent more than $2.1 million on TV ads, mailers and posters in train stations, while the pro-tax campaign raised $650,000 from just one donor — former New York City Mayor Michael Bloomberg, who tried to ban supersized sodas in 2012.

"The results will surely encourage other municipalities across the nation to pursue similar initiatives to fight obesity and diabetes," said Howard Wolfson, spokesperson for Bloomberg Philanthropies. "We stand ready to assess and assist other local efforts in the coming election cycle."

"Mike Bloomberg stands ready to assess and assist," he added.

The idea behind the tax is that higher prices for soda reduces consumption, which reduces rates of diabetes, obesity, heart disease and other ill effects linked to sugary beverages with low nutrition.

“Consumption taxes have been one of the most effective policy tools that we have to modify people's behavior,” said Beth Weitzman, vice dean and professor of health and public policy at New York University. “When prices go up, consumption goes down.  We have repeatedly seen this with everything from tobacco to alcohol to gasoline.”

Since Mexico passed a national sales tax on sugary drinks last year, with campaign help from Bloomberg, beverage sales are down 10 percent and juice, water and diet soda sales are up 7 percent, according to an early study. Unlike Berkeley's tax, Mexico's sales tax applies directly to consumers, lifting the price of a liter of soda by 10 percent.

The American Beverage Association, which donated millions to the campaign against Berkeley’s tax and is itself supported by Coca-Cola, PepsiCo and Dr. Pepper Snapple Group, said Wednesday that the industry is already combating obesity with the goal of reducing beverage calories consumed per person by 20 percent in 2025.

“People don’t support taxes and bans on common grocery items, like soft drinks,” the group said in a statement. “Our industry will continue working with serious policy leaders to focus on meaningful solutions that address the complex issue of obesity.”

As a radically liberal city, Berkeley has historically not represented mainstream America. The city provides medical marijuana to low-income residents, declares itself a “nuclear-free” zone and is discussing whether to ban drones in its airspace. But if not mainstream, Berkeley is heralded by many as a progressive trend-setter as the birth of the Free Speech student movement and leader of some efforts in civil rights and recycling, leaving some to speculate that more cities will tax sugar-sweetened drinks.

“This victory should inspire lots of other places to give it a try,” said Marion Nestle, professor of nutrition, food studies and public health at NYU and alumna of the University of Berkeley.