City Council gave its initial stamp of approval to a 1.5-cent-per-ounce tax on sweetened drinks and diet beverages Wednesday night, paving the way for Philadelphia to become the first big city in the country to impose a soda tax.

After months of negotiations and a turbulent day that stretched into the evening, Council President Darrell L. Clarke said members backed a proposal Council had twice before rejected because of the programs it will fund - including the sweeping expansion of prekindergarten Mayor Kenney has pitched as an antipoverty initiative.

"We hope that the outcome is one that will obviously benefit pretty much every citizen in the city of Philadelphia," Clarke said just before the vote was taken. "The action that we will take will probably have some people with a sour taste in their mouths."

If the tax gets final approval by the full Council next week, as anticipated, it could have nationwide reverberations - or at least give legislators in other cities another reason for considering it. The 17 members voted by voice vote, not a roll call, but will be polled at the final vote.

The levy, which is expected to face legal challenges from a beverage industry that has spent millions fighting it, would hit thousands of items, including all sweetened beverages, whether sugar-based or diet. That includes bottled or fountain sodas, teas, sports drinks, flavored waters, and energy drinks, among other products.

Exempt products include baby formula and beverages that are more than 50 percent fresh fruit, fresh vegetables, or milk. Beverages for which customers request sweetener or add it themselves (such as at a coffee shop) are also exempt.

The tax would be levied on distributors and add 18 cents to the cost of a 12-ounce can, $1 to the cost of a 2-liter container, and $2.16 to the cost of a 12-pack. Still unknown: how much of that cost would be passed on to consumers.

While short of the 3-cent-per-ounce tax that Kenney originally sought, the tax would bring in $91 million annually.

"We originally wanted $95 million," Lauren Hitt, Kenney's spokeswoman, said. "We'll have to make some cuts, but you don't always get everything you ask for. That's the meaning of compromise."

The money would pay for pre-K expansion; the creation of community schools; improvements to parks, recreation centers and libraries; and a tax-credit program for businesses that sell healthy beverages.

But in a curveball, Kenney's administration said $41 million of the revenue raised through 2020 would go into the city's fund balance, which has dropped rather dramatically from $150 million last year to $70 million this year. Fund balances - the difference between what a city spends and what it brings in - are closely followed by rating agencies.

In 2018, $30 million, about a third of the tax's revenue, would go to the fund balance.

The change caught some Council members off-guard.

"We heard it was all about the kids, all about the kids," Councilman Bill Greenlee told Finance Director Rob Dubow after Dubow acknowledged the administration should have mentioned that part of the plan earlier. "Sometime this afternoon, we heard it's also about the fund balance."

Clarke said the shift made some members more comfortable with the levy, due to concerns about the city's low fund balance.

Anthony Campisi, a spokesman for No Philly Grocery Tax Coalition, which is funded by the American Beverage Association, said the fund-balance issue should have been disclosed sooner. In a statement, the coalition called the tax "discriminatory."

"This tax will fall hardest on those who can least afford it, hurt small businesses, and is an unsustainable way to pay for important programs," the group said.

New York Mayor Michael Bloomberg has helped fund a TV and radio ad campaign to try to drum up public support for the tax in recent weeks.

Nationally, the beverage industry has succeeded in fighting the tax in most places it's been raised.

Berkeley, Calif., is the only city with a tax on sweetened drinks: a 1-cent-per-ounce tax was passed by voters in November. Similar measures are being considered in San Francisco, Oakland, Calif., and Boulder, Colo.

Locally, Council has seemed for weeks to be moving toward passing some kind of new tax to fund Kenney's initiatives. But at times Wednesday, it seemed like the plan might run off the rails.

Hours before the vote was scheduled, opponents blanketed City Hall's northern apron for a rally as 18-wheel Coca-Cola trucks rounded the building, horns blaring. Inside, preschoolers packed Council's hallways for a read-in that digressed into a dance party when the tots tired of the initial plan.

The tone among the pro-tax side was celebratory - and not just among the kids.

But then the scheduled 2 p.m. start of Council's meeting came and went. And six more hours passed with Council members, beverage industry lobbyists, and members of the administration huddling in the halls and going in and out of offices, brokering the deal.

When the vote came, Clarke, who strongly opposed sugary beverage taxes when Mayor Michael Nutter twice proposed them as health initiatives, was not the loudest to say, "Aye."

But he did say it.

On his way out of Council's chambers, Clarke passed bottler Harold Honickman, a known ally and political donor. Clarke paused briefly, then patted Honickman once on the shoulder. Honickman patted Clarke twice on the back before both parted without saying a word.