SEATTLE — The Seattle City Council thwarted a rare veto by Mayor Jenny Durkan on Monday by voting for a second time to create a special fund for the city’s soda-tax revenue.

Disagreement over how to allocate money from the tax on sugar-sweetened beverages has roiled City Hall, with Durkan butting up against a council majority. The new tax raised about $22 million last year, more than initially predicted.

Monday’s vote was 6-3. Six votes are needed to override a mayoral veto.

“The tax was never intended to pad the pockets of our budget overall,” Councilmember Teresa Mosqueda said.

When the council passed the tax in 2017, it indicated the money should be used to boost healthful-food and early-education programs serving low-income communities of color that are targeted by soda marketing and that were expected to bear the brunt of the tax.

But when the mayor drew up this year’s budget, she used about $6 million from the soda tax to supplant baseline allocations for food banks, a parent-child program and other services that previously had been supported by the city’s general fund. The maneuver freed up $6 million in general-fund revenue for her other priorities.

Though council members reluctantly agreed at the time, many objected to Durkan’s move, saying the soda tax was meant to expand the programs. They vowed to stop Durkan from executing the same move in 2020, setting up the recent battle.

The council voted 7-1 on July 22 to allocate the soda-tax revenue through its own fund. Durkan told the council not to create its own fund, warning that would open a hole in next year’s budget. She also urged nonprofits to side with her in the debate. The council said it would work with the mayor to plug the $6 million hole with money from elsewhere.

Monday’s vote was needed because Durkan vetoed the legislation on Aug. 2.

“Throughout this entire discussion, council has never proposed potential new sources of revenue or cuts,” the mayor wrote in a letter about the veto.

During a public comment period, advocates touted healthful-food initiatives, such as a program that gives families vouchers to buy fruits and vegetables. Mosqueda suggested Durkan had threatened nonprofits with a “manufactured crisis.”

“I am extremely disappointed that again we have to have this conversation about how we will not engage in austerity budget,” she said. “We are not going to engage in pitting populations against populations.”

Though Mosqueda said, “I’m hoping this type of drama ... will be behind us,” the struggle could continue next month, when the mayor proposes her 2020 budget.