Dean Preston, a tenants rights activist, squeaked out a victory against the appointed incumbent in San Francisco’s District Five Saturday — a significant win that deals a major blow to Mayor London Breed and will likely bolster the progressives on the Board of Supervisors.

Preston had a 170-vote lead over Supervisor Vallie Brown in the ranked-choice totals, Saturday, with only a handful of the votes left to count. Now, Preston will represent a diverse collection of neighborhoods that includes the Fillmore, Western Addition, Haight-Ashbury, Hayes Valley and the Inner Sunset.

Although Brown finished with 67 more first-place votes than Preston, he collected enough second-choice votes to pull out the win.

“Our campaign was very clearly challenging the status quo,” Preston said in a phone interview Saturday, sounding breathless and jubilant. “We won in a low turn-out election with that message — I think it makes a statement.”

He’s the first democratic socialist to be elected supervisor since Harry Britt won the same district in 1979.

Brown didn’t immediately concede Saturday evening. Her campaign consultant, Leo Wallach, said his team was “still evaluating the results, and making sure everything is 100 percent resolved.”

Even though he won Tuesday, he will need to quickly prove himself: Preston will have to run again in November 2020, as he is filling out the rest of the term for Breed, who vacated the seat when she became mayor.

“What is missing in so many campaigns is a vision of what this town could be if we did not surrender to the darkest forces of capitalism and neo-liberalism,” Preston said at his campaign party at Hayes Valley wine bar Tuesday night. “We are going to change (this town) with mass mobilization, democratic socialism and fearless advocacy for the things we know are right.”

Preston only narrowly lost the seat in 2016 to Breed, the former district supervisor. He had an early, aggressive entry into the race and has been fundraising and campaigning since the mayor appointed Brown to the seat in July 2018.

Preston, originally from New York, has lived in District Five for 20 years and owns a home on Alamo Square. He is widely known for writing Proposition F, the June 2018 ballot measure that gives tenants facing eviction the right to a lawyer. He also created and ran Tenants Together, a statewide renters’ rights group, in 2008. He took a leave of absence as executive director to run for office.

His addition will tilt the already-progressive-leaning board even further to the left. Breed has already run into challenges with progressive supervisors during her year plus in office. Preston is seen as an adversary to Breed and said he will not be afraid to go against her when their priorities don’t align.

Brown, on the other hand, was seen as one of Breed’s few allies among the 11 supervisors. She was also one of four women on the 11-member board.

Political observers say Preston’s term will pose a major challenge for Breed, and her ability to push her legislative agenda through during her four-year term.

Preston “will not only continue the board majority, but replace someone who is a strong ally for the mayor and replace her with someone who is ... more of an opponent,” said Jason McDaniel, a political scientist at San Francisco State University.”

His campaign was backed by several of Brown’s colleagues on the board. While many said they liked working with Brown, others said they saw in Preston a more hard-charging supervisor would push for more ambitious legislation.

Preston’s win not only has implications for Breed, but also for the future of San Francisco. As a democratic socialist, he ran on a platform of making dramatic, sweeping and immediate change in the city. He will likely champion progressive policies on the Board of Supervisors that seek wholesale change in the city — like a proposal by two progressive supervisors, Matt Haney and Hillary Ronen, called MentalHealth SF that would revamp the city’s mental health care system.

Voters “sent a clear message with these results,” Haney said Saturday. “City Hall should be on notice.”

His campaign promises were ambitious. For example, he plans to propose a measure for the March 2020 ballot that would create free Muni service for all, and a plan to build 10,000 units of 100% affordable housing within 10 years.

While his supporters appreciated his moxie, his opponents criticized him for being too overzealous and unrealistic. Still, he was able to energize an enthusiastic base and beat out his opponent, who raised slightly more money and was and backed by prominent names in San Francisco politics, such as Breed, state Sen. Scott Wiener, Assemblyman David Chiu and California Sen. Kamala Harris.

Brown received $486,408 in contributions through the end of October, and Preston received $440,932.

Preston rallied the crowded bar of supporters at his campaign party late Tuesday with a rousing speech punctuated by chants of “Tax the rich” and “We’re gonna win!”

Jim Ross, a political consultant, always expected the District Five race to be close. But what made it razor thin, he said, was last-minute revelations by the San Francisco Tenants Union — which endorsed Preston — that Brown evicted three low-income African American tenants from her Fillmore building. Brown incorrectly said she evicted the tenants because they weren’t paying rent and issued a public apology for the misstatement last week.

Those revelations, he said, “dramatically” changed the dynamic of the race.

“It created this real contrast between Vallie Brown and Dean Preston,” he said. “He has this whole background as a tenants right advocate, and then Brown was seen as someone who evicts tenants.”

Jon Golinger, a political consultant, said Preston will be a “game changer” on the board.

“He is an organizer,” he said. “He will be proposing and driving things on the board ... and District Five will reclaim its spot as one of the most progressive districts in the city.”

San Francisco Chronicle staff writer Rachel Swan contributed to this report.

Trisha Thadani is a San Francisco Chronicle staff writer. Email: tthadani@sfchronicle.com Twitter: @TrishaThadani