Rebecca Rhynhart spent primary election day traveling to nearly two dozen polling places. And at each, person after person said they had voted for her to be the city's next controller.

Rhynhart didn't give the endorsements too much weight — "Because it's anecdotal, right?" — or let herself feel assured. Even as the results came in, showing from the first a solid lead over incumbent Alan Butkovitz, she held her breath.

"When it started to get to 25, 40, 50 percent, that's when I started to think this might really be happening," she said. "We might have done it."

The rest of the city was right there with her.

Few expected a former mayoral aide who had never run for office to oust a three-term incumbent who had the backing of the Democratic Party. But Rhynhart did just that, political observers say, because she positioned herself as reformer in a year when reformers went to the polls.

Those liberal voters lifted civil rights attorney Larry Krasner to the top of a crowded field in the Democratic primary for district attorney, and they likely gave Rhynhart a critical boost.

She pulled in 58 percent of the vote, trouncing Butkovitz's 40 percent.

"She was the right candidate at the right time," Ken Snyder, a longtime Philadelphia political strategist, said. "And no one said anything negative about her."

Rhynhart, 42, will face Republican Michael Tomlinson in the November general election. Registered Democrats outnumber Republicans in Philadelphia by a ratio of 7-1.

Rhynhart won by successfully painting herself as an outsider and Butkovitz, a longtime ward leader and former state representative, as too close to the Democratic Party to properly act as its watchdog.

Still, she is no novice to city government (a fact Butkovitz tried to use against her). Rhynhart resigned as Mayor Kenney's chief administrative officer to run. Before that, she worked for former Mayor Michael A. Nutter during his eight years in office.

(Though the Democratic Party endorsed Butkovitz, one ward -- Nutter's -- listed Rhynhart on the sample ballot given to voters at the polls. Nutter has famously sparred with Butkovitz, once calling him a "liar, a snake and a hypocrite.")

On Wednesday, Rhynhart showed little fatigue from the long campaign. She said one of her first priorities in office would be to order an independent audit of the Controller's Office.

She also repeated her pledge to audit every city department every year. And she said she would quickly launch an audit of the Parking Authority with the goal of bringing in more revenue for the School District, something she has faulted Butkovitz for not doing in recent years.

"It was really wonderful to see so many voters go out and support me," she said. "And I think it just shows that my message really resonated."

It did with the Laborers' District Council, which backed Butkovitz in his previous bids but this time endorsed Rhynhart and distributed 80,000 sample ballots supporting her, according to Ryan Boyer, the union's business manager. (About 134,000 people voted in the race.)

"This wasn't anti-Al. This was pro-Rebecca," he said. "Sometimes you have a better candidate. And I think in Philadelphia for far too long, we've gone with the incumbent because they're the incumbent. And this time we decided to back away from that."

U.S. Rep. Robert Brady, chairman of the Democratic City Committee, called the union's sample ballot a "big factor" for Rhynhart. He also said there was likely strong turnout among female voters and in liberal wards. Though she wasn't his candidate, Brady said he talked to Rhynhart Wednesday and they agreed to work together.

"She knows she wasn't the establishment candidate," he said. "But she's not the enemy."

Rhynhart also earned credibility with a few key endorsements, including that of former Gov. Ed Rendell.

Rendell on Wednesday also noted the significance of female voters in the election, saying that when campaigning for Rhynhart, he often stressed the losses in 2016 of Hillary Clinton for president and Katie McGinty for the U.S. Senate.

Even with that hard push, the results shocked him.

"I couldn't believe it," Rendell said. "I thought we had a good chance to win but I never thought we'd win 58 to 40 percent. Good God."