San Francisco Supervisor Jane Kim is surging in the upcoming mayor’s race, and is now hot on the heels of front-runner Board of Supervisors President London Breed, a new poll shows.

Former state Sen. Mark Leno, whose fundraising sprint out of the gate helped make him a co-leader in early polls, has dropped to third place, the latest survey indicates.

The poll found Breed leading with 29 percent of first-pick votes, with Kim at 26 percent and Leno at 19 percent. Former Supervisor Angela Alioto had 8 percent.

Leno, who is seeking to become the city’s first openly gay mayor, led among LGBT voters — with 37 percent. That compares to Breed at 27 percent and Kim at 21 percent.

“Breed and Kim have really moved ahead of the pack here,” said pollster David Metz. “Leno, who folks early on thought might be the favorite, is struggling to get traction.”

Four other candidates picked up a combined 3 percent in the survey, with the remaining respondents undecided.

The city firefighters union commissioned the poll by Fairbank, Maslin, Maullin, Metz & Associates. The landline and cell phone survey of 462 likely voters was taken from Feb. 22 to 28 and was conducted in English and Chinese. It has a 4.6 percentage point margin of error.

Breed also came out on top when the pollsters ran the voters’ second and third picks to take into account San Francisco’s ranked-choice system.

Under the ranked results — in which bottom finishers are sequentially eliminated and their votes redistributed until someone gets a majority — Breed bested Kim by 56 to 44 percent.

The results indicate Breed “is in a strong position to win,” Metz said.

“I’m surprised — I really thought it was a Breed-Leno race, and now it shows London and Kim ... in a horse race,” said Tom O’Connor, president of the firefighters union, which has endorsed Breed.

One potentially telling finding of the poll was how respondents answered when asked whether they were looking for a candidate to “build consensus” on problems like affordable housing and homelessness, or one who would “shake things up and change the direction of the city” — be it pushing “special interests out of City Hall” or fighting “neighborhood displacement.”

By better than 2 to 1, people picked “build consensus.”

The race is “less about ideology and more about being able to deliver on fixing the things voters want fixed,” Metz said.

It could be the Kim campaign is picking up on that sentiment — she criticized the late Mayor Ed Lee’s decision to clear out the sprawling Division Street homeless encampments in 2016, but now she’s pushing a “San Francisco Loves Clean Streets” effort to make sidewalks more presentable.

The poll backs up an informal survey following a mayoral forum earlier this month at the Irish Cultural Center. The 425 attendees took part in an email survey.

The results: Breed, 36 percent; Kim, 32 percent; Alioto, 24 percent — and Leno, 8 percent.

As both polls show, the race is up for grabs.

High flier: For all the talk about political action committees and hidden money in the mayor’s race, the biggest San Francisco spender to date in this year’s election cycle appears to be District Two supervisor candidate Nick Josefowitz .

Records show the solar power entrepreneur and member of the BART Board of Directors has spent upward of $400,000 on his bid to take the supervisor’s seat vacated by Mayor Mark Farrell.

The biggest chunk of Josefowitz’s money, $392,000, went into promoting a June ballot initiative to bar a possible rival — former Supervisor Michela Alioto-Pier — and other termed-out supervisors from returning to the board.

The air went out of that drive when Farrell appointed his former aide Catherine Stefani to his vacated seat and Alioto-Pier bowed out of the race.

Josefowitz then spent an undisclosed sum suing the city over its decision to allow Stefani to run for the seat in November rather than in a June special election. Josefowitz lost at trial, then on appeal.

Josefowitz says he isn’t trying to buy his way onto the board. “Money doesn’t buy you elections,” he said.

He says his real currency is from the nearly 800 supporters who have contributed a total of $250,000 to his District Two campaign.

Meanwhile, Stefani kicked off her money drive recently with a breakfast fundraiser hosted at Original Joe’s by progressive Supervisors Aaron Peskin and Hillary Ronen. She raised $6,300.

Guests included Farrell; representatives from the firefighters union, the Residential Builders Association and the Building Owners and Managers Association; and people from neighborhood groups from the Marina, Nob Hill and Cathedral Hill.

Ronen said her support for Stefani was less about politics and was more about the friendship the two forged when both were supervisorial staffers.

Peskin told us he didn’t agree with all of Stefani’s politics but “can’t stand” Josefowitz or his tactics.

It ought to be an interesting — and expensive — race.