PHOENIX — Kate Gallego opened a large lead over Daniel Valenzuela early in the race for Phoenix mayor on Tuesday.

Though the race is officially nonpartisan, Gallego and Valenzuela are both Democrats who largely agree on most issues but faced off bitterly on funding for sports arenas and public safety.

Both are former council members who gave up their seats to run for mayor of the fifth-largest U.S. city.

Right now, @KateWGallego to her crowd of supporters - “we did it” - crowd chanting “Mayor Kate” after the latest election numbers come in. pic.twitter.com/H0nJlkkLGz — Justin Pazera (@justinpazera) March 13, 2019

With results showing her up by 17 percentage points, Gallego declared victory before supporters at a downtown Phoenix restaurant.

"We fought for inclusivity, we fought for innovation, we fought for a sustainable city," she said.

Valenzuela conceded in a post on Twitter.

"Thank you, Phoenix. I appreciate all you've done for me," he wrote. "Tomorrow morning I will continue to serve you as a lifelong public servant. Congratulations to our next mayor, @KateWGallego."

Outside groups -- some without disclosing their donors -- unleashed a barrage of attack ads in the final days of the campaign.

The winner will finish the term of former Mayor Greg Stanton, a Democrat who was elected to Congress in November.

Gallego, 37, is a graduate of Harvard and the University of Pennsylvania business school who worked at the Salt River Project utility before turning to politics.

She'd be the second woman elected to lead the city after Margaret Hance, a Republican mayor from 1976 to 1983. Thelda Williams, who is leading the city until the election, has been interim mayor three times.

Valenzuela, 43, is a firefighter in the neighboring city of Glendale. A Phoenix native, Valenzuela grew up poor with a mostly absent father. He would be the first Latino mayor of Phoenix.

Gallego led Valenzuela by a wide margin in the primary, when the field of candidates was narrowed to two. Since then she's come under a barrage of attacks by outside groups backing Valenzuela.

One ad funded by police and fire unions accuses Gallego of voting against money for public safety because she opposed a 2016 property tax increase.

Thank you, Phoenix. I appreciate all you’ve done for me. Tomorrow morning I will continue to serve you as a lifelong public servant. Congratulations to our next mayor, @KateWGallego. pic.twitter.com/1auks5NSc5 — Daniel Valenzuela (@Daniel4PhxMayor) March 13, 2019



Gallego said the money should come from a fund for sports facilities, not property taxes.

She and her supporters attacked Valenzuela's support for stadium subsidies for the Phoenix Suns and Milwaukee Brewers, which conducts spring training in west Phoenix's Maryvale neighborhood.

Home to 1.6 million people, Phoenix has seen its population rebound since thousands moved away after the Great Recession hit the economy especially hard. Downtown has seen a revitalization with new apartments, condos and businesses.

The next mayor will confront rising housing prices, a growing number of police shootings and a deeply divided city council.