ALBANY, N.Y. — In an election that tilted toward Democrats in many places, voters in Syracuse broke with both major parties and elected an independent as mayor.

Ben Walsh captured 54 percent of the vote in Tuesday’s four-way race to become the next leader of the central New York city known for its university. The last time Syracuse elected a mayor from outside the Democratic or Republican parties was in 1913 when a candidate won on the Progressive Party line.

“I’ve never been affiliated with a party and when I decided I had to run everyone said I had to pick, that I couldn’t be elected as an independent,” Walsh told The Associated Press on Wednesday. “The clear message throughout the campaign is that people wanted change. They want to see our leaders working together.”

The 38-year-old has worked in community development, in both government and in the private sector, and is the son of former Republican congressman Jim Walsh and the grandson of a former Republican mayor.

Independent mayors in midsized and large cities are unusual though not unheard of. San Antonio, Las Vegas, Reno, Nevada, and Raleigh, North Carolina, are all among the U.S. cities that currently have independent mayors, though some were elected in non-partisan elections. Former New York City Mayor Michael Bloomberg was first elected as a Republican but later switched to being an independent.

Walsh pulled off his unlikely victory by peeling off a large number of Democratic voters in the left-leaning college town, according to Siena College pollster Steven Greenberg.

“We don’t often see third-party candidates winning in the state of New York,” Greenberg said. He said Walsh likely received a boost from voters who recalled his family name, and others willing to break ranks with the major parties. “Clearly there was a large Democratic crossover.”

When he takes office in January Walsh will succeed Mayor Stephanie Miner, a Democrat and noted critic of Democratic Gov. Andrew Cuomo. Miner has been mentioned as a possible primary challenger to Cuomo in next year’s gubernatorial election.

Walsh’s main opponent in the race, Democrat Juanita Perez Williams, had Cuomo’s backing and the support of labor unions. Perez Williams, a former naval prosecutor, Syracuse University official and city legal chief, would have been the city’s first Latina mayor.

In her concession speech, Perez Williams said she still believed in the Democratic Party, The Syracuse Post-Standard reported.

“I’m afraid that people have given up,” she said. “We can’t do that.”