Throughout the June primary, and even in its aftermath, Democrats Betty Yee and John Pérez battled in the state controller's race.
But Yee, a state Board of Equalization member, and Pérez, the former Assembly speaker, were trying for second place and a chance to move on to the November general election.
Sitting comfortably in first place was Fresno Mayor Ashley Swearengin, who watched as Pérez requested a recount when the final tally in June showed him just 481 votes behind Yee.
All along, Swearengin -- as the only prominent Republican -- was deemed the front-runner in the controller's race, the one candidate who seemed assured of moving on from a primary that sends the top two finishers, regardless of political party, to the general election.
Now, there is a role reversal, as political experts of every stripe have given the underdog label to Swearengin. She's facing Yee, who prevailed after Pérez called off the recount in the battle to replace termed-out Controller John Chiang.
Swearengin and Yee have never met in person, although the mayor did call to congratulate Yee after the final county submitted its vote tally and she held the lead over Pérez.
Now it's a one-on-one battle for the statewide post. Yee's biggest advantage is that she's a Democrat in a strongly Democratic state. And though Swearengin has been hailed as a rising star in the Republican Party -- telegenic, charismatic, moderate -- her party's registration is still just 28.4%.
"It would be perceived as a big upset if (Swearengin) were to win," said Allan Hoffenblum, a longtime Republican strategist and author of the California Target Book, which tracks the state's elections. "It's a race where she'll have to do everything right and Yee will have to do something wrong."
That means Swearengin will have to win a huge number of independent voters, and probably a chunk of crossover Democrats, maybe some willing to "split" their ballot and vote for her even as they vote to reelect Jerry Brown as governor. Voters often follow the lead of their gubernatorial vote on down-ticket statewide races such as treasurer and controller.
Experts say it's a tall order for Swearengin, and her quest for statewide office might have been easier if Pérez was her opponent.
If that were the case, Swearengin might have been able to win some votes on the gender issue -- he being male and she female -- political observers said, and also highlight Pérez's ties to both organized labor and to a partisan and unpopular state Legislature.
Yee, by comparison, is harder to pin down as either a partisan or a career politician.
Prior to serving on the Board of Equalization -- which hears tax appeals -- she was chief deputy director for budget at the state Department of Finance, and before that held staff positions on several fiscal and policy committees in both the state Assembly and Senate. She has a master's in public administration.
In fact, Yee said she's more than happy to tout her credentials, and feels they fit perfectly with the controller's job.
Her state Board of Equalization district also represents 21 counties from the Oregon border to Santa Barbara that are almost exclusively Democratic dominated.
Swearengin, however, likes her experience, too. She's in her second term leading Fresno, being elected mayor in November 2008 and easily reelected in 2012. Before that, she was CEO of the Regional Jobs Initiative and has a master's in business administration.
And Swearengin also said she knows a little something about being a candidate from a minority party. In the city of Fresno, Democrats outnumber Republicans by more than 20,000 voters.
Despite all this, as both candidates plot election strategy during the summer election doldrums -- all while they continue to hold down their respective current jobs -- they say the plan is to run campaigns similar to the primary.
"Our approach has been the same, even with the mystery about our opponent," Swearengin said. "We knew (that) regardless of who we faced."
Central to that approach, she said, is telling voters around California about how she led Fresno through the nation's worst economic downturn since the Great Depression and into what she says is a period of fiscal health and job creation.
Yee echoes Swearengin. Her focus will be voter engagement and outreach, especially to the state's business community.
"As in the primary, I never viewed it as running against someone as getting my résumé and experience and credentials out there," Yee said.
Already, Swearengin has some political experts wondering why she didn't purchase a statement in a voter information guide that is sent out statewide by the Secretary of State.
"This was an affordable means to guarantee her message would be delivered to all registered voters," Hoffenblum said.
Pérez, Hoffenblum noted, passed on a ballot statement in the primary, and Yee did submit one.
"I'm sure that got her at least 481 votes," Hoffenblum said of Yee's narrow winning margin.
But Tim Clark, Swearengin's campaign consultant, said it wasn't worth the approximately $7,000 cost.
"We don't believe that it gets read or has any impact," he said. "In the grand scheme of what matters and what doesn't, we decided to let that one go."
Still, it wasn't without some thought, Clark said. But the decision had to be made within 14 days of the June 3 primary. At that point, Pérez was ahead and very well could have been Swearengin's opponent.
If Swearengin published the ballot statement, it would have required her to agree to an $8.1 million campaign spending limit. Pérez's fundraising, Clark said, made it likely he could have spent more than the limit if he'd advanced to the general election. Swearengin, he said, couldn't hamstring her campaign if he might be her opponent.
Back in April, Clark said the campaign's fundraising goals were $5 million to $10 million.
But Pérez outspent Yee 3-to-1 in the primary election and still lost.
Yee said she "felt very strongly about having a ballot statement" and said it benefitted her primary campaign -- and thinks it will again for the November general election.
As for bumping up against an $8.1 million spending limit, Yee said it is highly unlikely. In the primary, she spent $1.3 million and added that, traditionally, the controller's race has been in the $2 million to $3 million range.
Anything higher, Yee said, "does not bode well for what the office is. Its appeal to voters is on a non-partisan basis."
Still, for Swearengin to be competitive, a good chunk of change might be what it takes -- either directly or indirectly via an independent expenditure.
Already, there is speculation that Charles Munger Jr., a businessman, Republican activist and one of the state's most influential GOP donors, may weigh in independently for Swearengin.
The two talked at the state Republican Party convention in March, and Munger donated $6,800 to her campaign in April.
Munger couldn't be reached for comment, and Clark said campaign rules prohibit any coordination of an independent expenditure with a campaign. But he would welcome it, Clark said.
"Charles Munger is an individual that cares about the future of the state," Clark said. "He cares about the future of having a counter-balancing party and has the ability to affect both. We're hoping (Swearengin is) part of his plan."
Yee is one of those who has heard speculation that the Republican Party or some of its key donors may spend big on Swearengin.
Even if that happens, it still may be Yee's race to lose, expert said.
Hoffenblum, the Republican strategist, said with the current Republican registration numbers, even former Gov. Arnold Schwarzenegger might not be electable.
In addition to the registration numbers and the overall power of the Democratic Party statewide, Yee has a "credible résumé," especially for the controller's office, Hoffenblum said.
Swearengin also has a strong résumé and many intangibles that make a good candidate, but the political challenges outside of her control might be too much to overcome, he said.
"Her biggest challenge is the Republican brand and the very low Republican registration," Hoffenblum said.