San Rafael Councilman Marc Levine took an early lead Tuesday night over incumbent Assemblyman Michael Allen in their battle for the 10th Assembly District seat.
With all precincts in, Levine held 50.6 percent of the votes to Allen's 49.4 percent.
"I'm cautiously optimistic about the outcome tonight," Levine said from his campaign party at Aurora Art Studios in San Rafael.
The two Democrats were vying to represent voters in a newly created district that spans Marin County, part of Santa Rosa and portions of western and southern Sonoma County.
The pair earned the right to compete for the district seat under California's new top-two primary system. The race gained attention in part because it was one of about two dozen in the state pitting members of the same party against one another in the general election.