*This campaign was not funded by the Robert Wood Johnson Foundation.

Consuming sugary drinks, such as fruit drinks with added sugar, sports drinks, and soda, poses a real health risk to kids. In 2016, Philadelphia became the largest, and only the second, U.S. city to tax soda and other sugary drinks.

For years, cities such as Seattle, San Francisco and Chicago have tried and failed to do the same, faced with intense opposition from the soda industry. Even in Philadelphia, two previous attempts to pass a sugary drinks tax failed.

But this time, instead of focusing on the health aspect, the city’s new mayor, Jim Kenney, proposed the tax as a way to fund community and education initiatives. The new Philadelphia tax of 1.5 cents per ounce will be used to fund programs such as citywide pre-K education. The tax, passed by the City Council with a 13-4 vote, will take effect Jan. 1, 2017.

“Philadelphia made a historic investment in our neighborhoods and in our education system today,” Kenney said in a statement. “I … thank my colleagues in Council for working with our administration to craft a shared agenda that will improve the education, health and prosperity of children and families all across our city for years to come.”

When big cities pass taxes such as the one in Philadelphia, it can set a precedent for other cities to follow. For example, tobacco taxes that were once largely opposed became commonplace. Berkeley, California, is the only other U.S. city to pass a sugary drinks tax. Since the 1-cent-per-ounce tax went into effect in March 2015, it has so far generated $1.5 million in revenue, most of which is used to fund nutrition and health programs.

The wins in Berkeley and Philadelphia make it possible for other cities to consider similar taxes. In addition to San Francisco, at least two other California cities — Oakland and Albany — are considering a tax.According to the American Heart Association, men should have no more than 9 teaspoons of added sugar each day and women should have no more than about 6 teaspoons a day. A 12-ounce can of soda contains about 8 teaspoons of added sugar.