SAN FRANCISCO — In San Francisco, the candidate with the most first-place votes is trailing in a tight race for mayor.

London Breed, the president of San Francisco's Board of Supervisors, is some 10 percentage points ahead of former state Sen. Mark Leno in votes for first-place. Yet, Leno was leading Breed in the overall race by 255 votes on Thursday.

How does this make any sense? San Francisco uses a ranked-choice voting system in which voters also choose their second and third favorites for mayor.

In this case, Leno has more first-place and second-place votes put together than Breed.

___

HOW DOES RANKED-CHOICE VOTING WORK?

In San Francisco, voters pick up to three candidates in order of preference on one ballot.

If no candidate has more than 50 percent of the vote outright, elimination rounds begin. If a voter's No. 1 pick is eliminated, the voter's No. 2 candidate gets that vote and so on until there's a winner. Ranked-choice voting has been used in San Francisco since 2004 to elect the mayor, city attorney, board of supervisors and other citywide offices.

Former San Francisco Mayor Gavin Newsom, who is running for California governor, says he finds the concept confusing and complicated.

"If you can explain it to someone in less than two hours, you have mastered an understanding of something I have never fully understood," he said.

___

IS RANKED-CHOICE VOTING USED ELSEWHERE?

A dozen city and county governments use this kind of system, according to FairVote, a nonpartisan electoral reforms group based in Maryland. A few San Francisco Bay Area cities use the system, including Oakland. It's also used in Portland, Maine, and in the Minnesota cities of Minneapolis and St, Paul.

Four other jurisdictions are set to use ranked-choice voting, including the state of Maine in its primary on Tuesday where there are four federal and state races with at least three candidates. Races include the Democratic and Republican primaries for Maine governor.

Cambridge, Massachusetts, has elected slates of city council and school board using an at-large form of ranked-choice voting since 1941.

___

WHAT ARE THE BENEFITS?

Advocates say the system promotes the election of a candidate who has a majority of support through first- and second-place votes. On the flip side, it avoids the election of a candidate who has less than 50 percent of the vote.

Supporters also say the system avoids the cost of a separate runoff election and encourages collaboration among candidates.

In San Francisco, Leno and Supervisor Jane Kim encouraged their supporters to pick the other for their No. 2. Leno is benefiting from the alliance as he's receiving the bulk of Kim's votes. She is in third place.

___

WHAT ARE DRAWBACKS?

Jason McDaniel, associate political science professor at San Francisco State University, says his research shows ranked-choice voting increases the rate of ballot errors and disqualifies ballots, particularly among lower-income residents.

Picking a winner by ranked-choice could also raise the whiff of illegitimacy, he said, noting that Breed scored 36 percent of first-place votes citywide.

"I do think it might have an effect," he said. "Look, only 26 percent of voters chose Mark Leno, and that might hurt his legitimacy going forward, the perception of that" if he becomes mayor.

Still, turnout in San Francisco could top 50 percent, which is higher than usual for recent June gubernatorial primaries and mayoral races.

And as advocates point out, results show that far more people were confused by and over-voted in the governor's race than in the mayor's race.

__

AP staff writers Lorin Eleni Gill in San Francisco and David Sharp in Portland, Maine, contributed to this report.