SAN JOSE COUNCILMEMBER Matt Mahan has emerged as the frontrunner in the highly-anticipated and competitive San Jose mayor’s race.

With 51 percent of total ballots counted Wednesday night, Mahan leads with 51.7 percent of the vote. Chavez remains close with 48.2 percent. There are 4,766 votes between the two candidates.

The heated — and most expensive — contest is the first time San Jose is choosing a new mayor in nearly a decade. The pair beat out four other candidates in the primary election June primary to replace Mayor Sam Liccardo who’s terming out the end of the year.

At Mahan’s election party at the Blanco Urban Venue in downtown, more than 380 supporters showed up to cheer on the councilmember.

The crowd erupted in chanting, “Let’s go Matt! Let’s go Matt!” as the results came in shortly after 8 p.m.

Supporters were eating and drinking as Mahan fielded questions and greeted supporters.

“There are still a lot of votes to count but I’m incredibly proud of the campaign we ran,” Mahan told San José Spotlight after the first round of election results were posted.

Liccardo’s chief of staff Jim Reed — who helped raise hundreds of thousands of dollars to support Mahan through a PAC — appeared to celebrate the lead Tuesday night.

“We have a winner here,” Reed told San José Spotlight, referring to Mahan.

The San Jose mayor’s race—which was watched across the state and country—pitted a longtime seasoned politician against a relative business-backed newcomer.

Chavez, a Democrat who’s been a county supervisor since 2013, was previously a San Jose councilmember between 1996 and 2006. She also led the South Bay Labor Council, which represents more than 100,000 union members in the region, before being elected to the Board of Supervisors.

Chavez, 58, has the backing of the South Bay Labor Council, the San Jose Police Officers’ Association, former Bloom Energy executive Carl Guardino—a close friend of Liccardo, and every councilmember except Liccardo. As of November, Chavez has raised more than $1.1 million for her general campaign.

If elected, Chavez would be the third female mayor in San Jose history.

San Jose mayoral candidate and county Supervisor Cindy Chavez speaks to supporters at her election night party in Willow Glen. (Photo by Tran Nguyen/San Jose Spotlight)

Chavez held an election party at her campaign headquarters in Willow Glen. She was surrounded by more than 100 supporters, who blasted music and enjoyed food and drinks. With the close results, Chavez remained optimistic.

“I love this city,” Chavez said Tuesday night. “This campaign was an incredible opportunity to share our vision for the city. We had a coalition like none other… it’s exciting. It’s an honor.”

San Jose Vice Mayor Chappie Jones, along with a number of elected officials including Sen. Dave Cortese, Assemblymember Evan Low, Supervisor Susan Ellenberg, were on hand to support Chavez.

Jones said he expects the race to be “a nail biter.”

“It’s too early to call,” Jones told San José Spotlight. “We’ll keep waiting for results.”

Mahan, a 39-year-old Democrat, is former tech entrepreneur who was elected to the District 10 council seat two years ago. Mahan has a business background with leadership roles at tech startups, and served on the executive board of Silicon Valley Leadership Group.

Mahan earned support from Silicon Valley business circles, including from the Silicon Valley Biz PAC, billionaire real estate developer John Sobrato and the California realtor’s association. He’s endorsed by Liccardo and two former San Jose mayors, Tom McEnery and Chuck Reed. As of November, he has raised over $1.3 million for his general campaign.

Special interest groups collectively spent $5.1 million on mayoral candidates this general election, making it the most expensive in recent history.

Both candidates ran campaigns on issues like housing, homelessness and public safety, but their approaches differ.

Chavez planned to address homelessness through prevention and permanent affordable housing, touting her track record as a supervisor. She planned to hire 45 new police officers as mayor to bolster the thinly-staffed department, especially recruiting officers of color and women.

Mahan aims to restructure San Jose City Hall and foster greater accountability. He has championed quick-build temporary housing on public land to move people off the streets. One of his campaign promises is to tie raises of elected officials and city administrators to goals such as reducing crime and homelessness — and withhold raises unless those targets are met.

The high-profile race turned ugly and combative in recent weeks. Mahan criticized Chavez for giving bonuses to county employees and called her “a career politician” who failed to address homelessness. His campaign and one of his supports  faced condemnation from the Santa Clara County Democratic Party over “racially-charged” comment against Chavez, including accusations that he called her a communist.

Chavez denounced Mahan for his affiliation with the National Rifle Association (NRA) after he pitched his tech company’s services to the gun lobby in a 2013 tweetChavez’s camp also questioned his position on abortionpolice staffing shortages and criticized his vote to approve a raise for five top city officials despite his campaign promise.

The story will be updated.

Contact Tran Nguyen at tran@sanjosespotlight.com or follow @nguyenntrann on Twitter. 

This story originally appeared in San Jose Spotlight.