Philadelphia’s tax on soda and sweetened beverages is legal, the Pennsylvania Supreme Court has ruled, rejecting arguments that the levy improperly duplicated the state sales tax.

The levy, which was the first of its kind in the nation and a model used by other cities, has been Philadelphia Mayor Jim Kenney’s signature legislative effort, but it was met with challenges by several retailers and beverage distributors, who contended that it was a “power grab” by city officials and a violation of Pennsylvania’s Sterling Act, which prohibits Philadelphia from imposing a tax on a transaction or subject that the state already taxes.