Incumbent Das Williams was holding a narrow lead late Tuesday night on the race for the First District seat on the Santa Barbara County Board of Supervisors.
Semi-official election night results from 15,339 ballots showed Williams with 51.6 percent of the vote to 46.8 percent for challenger Laura Capps.
There are still thousands of vote-by-mail and provisional ballots left to count countywide, and updated election results are expected later this week, according to the Elections Office.
Capps and Williams have been throwing around big money in the campaign, and the battle between two prominent Democrats sparked bad blood between the two factions of the local Democratic Party.
“I feel really honored,” Williams said. “The crazy attacks against me didn’t work. From what we saw in our polling and our door-to-door interactions, they had no negative effect whatsoever. Nobody believed them.
“The reason why she did so well is that people have a lot of respect for the Capps name. Her messages against me didn’t work.”
Williams said voters remember his nearly two decades of experience and that the people of Santa Barbara, Carpinteria, Summerland and Montecito were pleased with his performance.
He held his victory party at Casablanca, a State Street restaurant, attended by Second District County Supervisor Gregg Hart, Santa Barbara City Councilmen Eric Friedman and Oscar Gutierrez, Santa Barbara Unified School District Board Member Rose Munoz, Mayor Cathy Murillo and others luminaries.
Williams was endorsed by the Democratic Party, and Capps, a member of the Santa Barbara Unified School District Board of Education, comes from a family of prominent Democrats — both of her parents served in the U.S. Congress.
The campaign was one of the most acrimonious political contests in decades.
It turned ugly after Capps accused Williams of cozying up to cannabis growers by accepting campaign donations from them while the county was developing its regulatory ordinance for the industry.

Then, last week, she accused him of working with “Big Oil” interests, and he fired back at a press conference.
Williams never directly attacked Capps in his statements, but his political action committee hit Capps hard and accused her of being “liberal Laura.”
Whoever is elected to the five-member Board of Supervisors will be sworn in to represent portions of the South Coast, from Santa Barbara to Carpinteria, and the Cuyama Valley.
The new four-year terms for each seat will begin in January.
Capps was optimistic late into the evening at her party at Jill’s Place on Santa Barbara Street. Santa Barbara School Board member Kate Ford, City Councilwoman Kristen Sneddon, Santa Barbara Planning Commissioner Deborah Schwartz and former county supervisor Susan Rose were among the prominent officials supporting Capps.
Capps told Noozhawk after the first wave of results came in that she was happy to see all the people at the party.
“I am feeling really optimistic,” she said.
The Third District seat appears to be heading for a November runoff, again, between Joan Hartmann and Bruce Porter.
In the Fourth District, with incumbent Peter Adam retiring after two terms, his chief of staff, Bob Nelson, did not face a challenge for the job.
Check back with Noozhawk for updates to this story.
— Noozhawk staff writer Joshua Molina can be reached at jmolina@noozhawk.com. Follow Noozhawk on Twitter: @noozhawk, @NoozhawkNews and @NoozhawkBiz. Connect with Noozhawk on Facebook.