Mayor Rahm Emanuel on Wednesday cracked the door open to a tax on sugary soft drinks to curb obesity and diabetes that drive burgeoning health care costs.

For four years, Emanuel has chosen the carrot over the stick, promoting “personal responsibility” while pressuring Coca-Cola and other soft-drink giants to contribute to city wellness programs and offer healthier vending-machine products.

Wednesday, as the City Council’s Health Committee took two hours of testimony — but no vote — on the contentious issue, Emanuel appeared to change his tune just a little bit.

Instead of slamming the door on the penny-an-ounce tax on sugary soft drinks proposed by Health Committee Chairman George Cardenas (12th), the mayor left the door open, comparing the sugar tax to the cigarette tax.

“The notion of a sugary [soft drink] tax is all about curbing behavior in the same way that we’ve done certain things about reducing smoking in this city,” the mayor said.

“We now have a wellness plan — one of the largest — that has resulted in savings. We have also reformed other health care expenditures because I think fundamentally changing peoples’ behavior can be a big savings financially.”

Emanuel said he has encouraged all 50 Chicago aldermen to come forward with cost-cutting and revenue-raising ideas to solve the city’s $30 billion pension crisis and Cardenas is no different.

“Ald. Cardenas has this idea and I said to him, ‘Have a hearing on it and have the discussion,’” the mayor said.

“At the end of the day, it’s not about that tax. It’s about finding savings in health care that also improves our overall health care efforts.”

The fight over a tax on sugary soft drinks has become a full-employment program for lobbyists.

Mara Georges, former Mayor Richard M. Daley’s longtime corporation counsel, and Victor Reyes, former chieftain of the Hispanic Democratic Organization at the center of the city hiring scandal, represent the American Beverage Association.

Mike Kasper, who helped Emanuel survive a 2011 residency challenge that nearly knocked the mayor off the ballot, is a lobbyist for restaurant and hospitality giant Delaware North who was seen button-holing aldermen outside the City Council chambers Wednesday.

At least two other clout-heavy lobbyists were also seen hanging around City Hall: former Ald. Mark Fary (12th), husband of former longtime Aviation Commissioner Rosemarie Andolino; and John Dunn, who served as Daley’s director of intergovernmental affairs.

The Chicago Coalition Against Beverage Taxes is being co-chaired by John Coli, the president of Teamsters Joint Council 25 who is one of Emanuel’s closest allies in organized labor.

Minutes before Wednesday’s hearing got under way, the American Beverage Association laid down the legal gauntlet.

Georges declared that Chicago has no legal authority to enact a penny-an-ounce tax on sugary soft drinks and warned aldermen to steer clear of it or risk having it overturned.

The former corporation counsel noted that Chicago already levies two taxes on soda pop: a 9-percent “fountain drink” tax on syrup, and a 3-percent “soft drink” tax on cans and bottles.

The penny-an-ounce tax proposed by Cardenas would would apply to syrup and powders as well as canned and bottled drinks, including juices, teas and sodas.

Georges argued there is only one way Chicago could legally increase the taxes it already imposes on sugary soft drinks without prior authorization from an Illinois General Assembly embroiled in its own budget stalemate. That’s by raising the 1.25 percent sales tax on all items purchased in Chicago by one-fourth of 1 percent.

“This tax will fail when met with a legal challenge,” Georges said. “And the only way the city can resurrect a tax like this is to get . . . either additional authority from the state of Illinois to increase its cap on taxes on soft drinks or . . . to allow it to increase its overall” sales tax.

Joining Georges at the pre-hearing news conference was Illinois Restaurant Association President Sam Toia, former owner of Leona’s Restaurants. Toia called the tax a regressive job-killer that could reverse the growth of Chicago’s burgeoning restaurant scene.

“This tax will drive up costs for thousands of restaurants in our city, increase prices for diners, shoppers and families and, ultimately, reduce jobs,” Toia said.

“This puts restaurants in a no-win situation, where they are forced to absorb these added costs for fear of losing valued customers or pass them on to the families that dine in their restaurants.”

On the other side was Dr. Karen Larimer, president-elect of the Metropolitan Chicago Board of Directors of the American Heart Association.

Larimer acknowledged there is no “silver bullet solution to our obesity-caused chronic disease epidemic.” But she noted that the average 8-year-old boy consumes eight servings or 64 ounces of sports drinks, sodas and fruit-flavored sugary soft drinks every week. That’s even though health experts warn adults to limit their weekly consumption to 36 ounces or 450 calories.

“As the No. 1 source of added sugar, sugary drinks are a significant contributor to this immense health problem . . . Reducing consumption through a tax will decrease rates of obesity, diabetes and heart disease,” Larimer said.

Cardenas has billed the sugar tax as an alternative to Emanuel’s wildly unpopular plan to impose a garbage collection fee. Both would raise around the same amount of money: $134 million a year.

After Wednesday’s hearing, Cardenas claimed to have a poll that shows 68 percent of Chicagoans support the sugar tax. The alderman said he plans to meet with the mayor, consult with the city’s Law Department and decide where to go from here.

“There are a couple of options we’re talking about. I’m not ready to discuss those yet,” he said.

South Side Ald. Toni Foulkes (16th), for one, is dead set against the sugar tax.

“We’re so close to Cicero — just like people on the east are going to Indiana. Same distance. People are going over to Cicero. We’re getting too much leakage out of the city,” she said.