PHILADELPHIA (AP) — Democrat Jim Kenney is running for re-election as mayor of the nation's sixth largest city, facing two challengers critical of his handling of the rising homicide rate, ongoing opioid epidemic and his signature achievement, a soda tax that's helping provide free preschool classes.

Kenney has had an eventful first term, antagonizing President Donald Trump over Philadelphia's sanctuary city status and carrying out the tax on soda and other sweetened drinks, inspiring several other cities around the country to enact their own.

Two longtime city political figures are running against him in the Democratic primary Tuesday. They are state Sen. Anthony Williams, who has served three decades in the state House and Senate combined, and Alan Butkovitz, the former city controller, who was defeated in 2017.

Both have derided the soda tax as regressive and want to see it repealed. They say Kenney, 60, hasn't done enough to combat crime and other major problems plaguing the city.

Philadelphia is a heavily Democratic city, where the winner of the primary is all but assured of victory in the fall election. Democrats outnumber Republicans nearly 7-1, and the city has not elected a Republican mayor in nearly 70 years. Billy Ciancaglini was running unopposed in the GOP primary.

No incumbent mayor has lost a bid for re-election in seven decades and Kenney doesn't seem concerned. In a radio interview, he called his challengers "annoying gnats."

The soda tax has been a flashpoint in the election.

It has generated more than $130 million, which is paying for free preschool programs and other community services like revamped recreation centers and libraries, initiatives Kenney has touted during the campaign.

The 1.5 cent-per-ounce tax on soda and other sweetened beverages, levied at the distributor level, has been criticized by some consumers and businesses. But it has withstood court challenges and a public relations onslaught by grocers and the beverage industry.

A study found that Philadelphia's 2017 tax led to a 38% decline in sugary soda and diet drink sales that year, even when taking into account an increase in sales in neighboring towns. It bolsters evidence that soda taxes can reduce sales, but whether they influence health remains unclear.

Kenney didn't try to sell the tax as a way to discourage people from drinking unhealthy beverages. Instead, he billed it as a way to help lift citizens out of poverty by improving early childhood education and rebuilding and renovating recreation centers, parks and libraries.

The mayor's office said the study is "entirely supportive" of the mayor's stance on the tax. They dispute beverage industry's claims that it has led to job losses.

Former New York Mayor Michael Bloomberg, a proponent of soda taxes, recently donated $1 million to a political action committee that is supporting Kenney's re-election effort. The beverage industry, in turn, has spent over $500,000 in the last month, and its PAC started airing television commercials critical of Kenney in April. They've spent millions in the last two years combatting the tax.

A recent poll by The Philadelphia Inquirer listed voters' top three concerns as crime, poverty and education.

The city recorded 350 homicides in 2018, the highest in over a decade — and the numbers are currently running higher than they were last year at this time.

Philadelphia is the nation's poorest big city, with a poverty rate of nearly 26%.

And its opioid crisis is among the worst in the U.S., with more than 1,100 fatal overdoses in 2018. Kenney and other city officials announced last year that they'd support a private entity operating and funding supervised injection sites — locations where people can shoot up under the supervision of a doctor or nurse who can administer an overdose antidote if necessary.

Both Williams, 62, and Butkovitz, 67, oppose such supervised injection sites, citing the legal uncertainty and community concern over putting such sites in their neighborhoods.

One thing the candidates all agree on is the city's status as a sanctuary city.

Sanctuary cities — like Philadelphia, New York and San Francisco — are places where authorities don't work with Immigration and Customs Enforcement to round up those living in the country illegally. A federal appeals court ruled in February that the Justice Department can't deny Philadelphia millions in public safety funding because of its sanctuary city status.

Get today’s top stories right in your inbox. Sign up for our daily morning newsletter.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.