A tumultuous election night ended Tuesday with a thin margin separating interim District Attorney Suzy Loftus from progressive challenger Chesa Boudin.
The latest results from early Wednesday morning showed Boudin with a lead in first-choice votes, but Loftus emerged as the top candidate under San Francisco’s ranked-choice voting system by a mere 240 votes, the tally shows.
But the Department of Elections still has tens of thousands of votes to count and plans to release daily updates at 4 p.m.
Both Boudin and Loftus remained optimistic about the results as they left their election parties for the night.
The count showed Boudin picked up 35,445 first-choice votes, or 32.91 percent of the vote, compared to 33,209 first-choice votes for Loftus — a roughly two percent difference.
But under ranked-choice voting, Loftus had the lead with 47,234 votes compared to 46,994 votes for Boudin.
In San Francisco, voters can rank multiple candidates for a single office by preference. A candidate wins if they receive more than 50 percent of the first-choice votes. Otherwise, candidates are eliminated round-by-round as subsequent choices are factored in until all the votes are counted and a candidate reaches a majority.
The outcome will determine who succeeds former District Attorney George Gascon as top prosecutor.
The race was the first open district attorney’s contest in 110 years until Mayor London Breed appointed Loftus as interim district attorney last month, when Gascon suddenly announced he would not finish his term.
The appointment helped Loftus raise her name recognition with voters, but also sparked backlash. Critics accused Breed of unfairly tipping the balance of the election in favor of Loftus just weeks before the election.
The race took another unexpected turn when the rank-and-file police union spent hundreds of thousands of dollars to oppose Boudin, running television ads and mailers that described him as a danger to public safety.
Boudin is a deputy public defender who entered the race amid a national wave of progressive district attorney candidates running to end mass incarceration. He was endorsed by Sen. Bernie Sanders, the presidential candidate, and is the son of imprisoned radicals.
Loftus has high-profile endorsements from a range of political heavyweights including Breed, Gov. Gavin Newsom and Sen. Kamala Harris. She is a former prosecutor and the ex-president of the Police Commission.
If Loftus wins, it will give Breed an ally in the District Attorney’s Office who can help move forward her agenda as the mayor seeks to address homelessness, car break-ins and drug use on the streets.
The other candidates in the race did not attract the same level of support as Loftus and Boudin on election day.
Nancy Tung received 22,335 first-choice votes, or 20.74 percent of the vote, while Leif Dautch came in fourth with 16,528 first-choice votes, or 15.35 percent.
Tung is an assistant district attorney for Alameda County who has positioned herself as the law-and-order candidate in the race.
Dautch is a deputy attorney general for California. His candidacy is backed by the San Francisco Deputy Sheriffs’ Association.
S.F. Examiner Staff Writer Laura Waxmann contributed to this report.