Two candidates with experience at Salem City Hall emerged as the top winners in the preliminary mayoral election.

Dominick Pangallo, a former mayoral chief of staff, and former Salem Mayor Neil Harrington finished Tuesday’s race with a comfortable margin over the three other candidates. Whoever emerges as the winner in the final election on May 16, it’ll be the first time a new mayor is elected in Salem since 2005. Former Mayor Kim Driscoll stepped away from her fifth term when she was sworn in as Massachusetts’ lieutenant governor in January.

Pangallo, who served as former Mayor Kim Driscoll’s chief of staff up until January 2022, said he’s thrilled by the outcome of the preliminary election. He collected more than 40% of the vote, the highest among the candidates, according to unofficial results released by the city.

“It’s a pivotal moment for Salem, and I feel strongly that we can’t go backwards,” he told GBH News Wednesday. “We have a strong foundation to build on and keep moving our city forward as a place that works for everyone.”

Harrington, who served as Salem’s mayor from 1990 to 1997, did not respond to GBH News’ requests for comment. He took in nearly a third of the vote, per the unofficial tally, and is running on preserving Salem’s economic future as well as keeping Salem’s Peabody Essex Museum from moving to Boston.

Pangallo said some of the top issues facing Salem are affordability and housing. He also wants to smooth the transition with new projects coming to the city, making sure that the city benefits from the new jobs an in-development offshore wind terminal while managing the project’s impact on surrounding neighborhoods.

Former City Councilor Stephen Dibble finished third with 14% of the vote, acting Mayor and Ward 5 City Councilor Robert McCarthy was fourth with 8%, and activist Stacia Kraft came in fifth with just under 3% at 188 votes.

Kraft tells GBH News that she “went into the race with no illusions” and said there are crucial issues that she hopes remain potent for the final election.

“We have nine planned developments for our flood zones and Salem is only eight square miles. And we now are moving towards privatizing the Salem Housing Authority,” she said. “So giving over our elderly and disabled residents to for-profit corporations, these are two very big issues.”

Kraft was the only candidate without a political background.

Pangallo attributes his win in the preliminary election to a strong field campaign, having knocked on almost 5,000 doors. He said that kind of grassroots effort is what helped him win 11 of the 14 precincts in Salem and he hopes will give him victory in May.

“I feel like the results in that preliminary election were a strong indication that our community is one that wants to keep moving forward as a place that's innovative and professionally managed.”

Campaign finance reports show both Pangallo and Harrington spent tens of thousands of dollars on the race. Pangallo spent nearly $28,000 since the beginning of November, while Harrington spent nearly $46,000. Both Pangallo and Harrington outspent the other candidates at least four times over.

As of the end of February, Pangallo had just over $42,000 cash on hand, closely matched by Harrington’s nearly $41,000.