After a grueling primary, Republican candidate Catharine Baker and pro-union Democrat Tim Sbranti may have been celebrating their dual victories in the 16th Assembly District primary early Wednesday -- but they already were looking ahead to the battle to come in the Nov. 4 general election.

In the final tally, Baker took home 36 percent of the vote and Sbranti about 30 percent, while Steve Glazer trailed with about 22 percent and Newell Arnerich about 11 percent.

"It certainly feels good to be in position to be on the November ballot," Baker said shortly after the results came out. "I feel very optimistic about it. It's going to be a good election for our community."

Sbranti, who is Dublin's mayor, a high school teacher and labor activist, also expressed gratitude.

"It was obviously a very hard fought primary, and I was very thankful to make it to the top two," he said. "We always knew that Baker would place first. She's a formidable opponent, who ran a great race.

"And we're well-positioned" for the general election, he said. "But we know it'll be a tough race."

Baker, the lone Republican, was expected to earn one of the spots, since conservative voters often turn out strongly in primaries, and the Democrat vote was split three ways. But to win Nov. 4 in the blue-leaning district, which extends from east of the Berkeley hills through Orinda and Walnut Creek to the Tri-Valley, might prove to be a greater challenge: The 16th district, which Joan Buchanan is termed out of, is about 40 percent Democrat, 32 percent Republican and 22 percent nonpartisan.

"I will be appealing not just to Republicans, but centrist voters in our district," said Baker, emphasizing that it has one of the largest independent populations of any Assembly seat in the state. "And I'm really pleased with the results, particularly given the almost $4 million that was driving Democratic turnout -- and we still came in first."

Waves of mud-slinging ads and commercials were launched between the camps of Democratic frontrunners Sbranti and Glazer. Unions poured more than $1.7 million to back Sbranti, and real estate interests and other groups spent more than $1.9 million to support Glazer. Nearly $200,000 in GOP-vested independent expenditures were spent to pump up Baker's campaign.

Glazer, a longtime political strategist and adviser for Gov. Jerry Brown, billed himself as willing to buck powerful union forces by calling for a BART strike ban, but pro-Sbranti forces were able to paint him as beholden to corporate interests in Sacramento.

"When you are trying to promote a political center in the Legislature, you make yourself vulnerable to attacks for the left and the right," said Glazer, mainly attributing his loss to attacks from both Republican and Democratic camps. "I was trying to upend the status quo, and it was no surprise that the business-as-usual crowd pushed back."

Contact Joyce Tsai at 925-847-2123. Follow her at Twitter.com/joycetsainews.