Sgt. Eric Tang rolled down his patrol-car window and waved as a woman driving by him in Fremont’s upscale Scott Creek Terrace neighborhood asked, “Did you get my email?”

Tang hadn’t, so the woman explained that someone had set off firecrackers on a recent night.

“We got their license plates and video footage,” she said, before Tang promised to look into the matter.

One of the neighborhood’s vast array of cameras — positioned by residents to record nearly every movement — peeked over a rosebush as the woman drove off.

Fremont, the fourth-largest Bay Area city with just over 230,000 residents, has cemented its position as one of the safest big cities in the nation, a trend that has followed its emergence as a diverse Silicon Valley hub, and one that police and residents attribute to a combination of hypervigilance and mass public and private surveillance.

The city hasn’t seen a homicide since 2015, and counted a total of only eight in the previous five years. Fremont once had nine homicides in a single year, in 1998.

A Chronicle review of homicide counts in the Bay Area’s 15 biggest cities in the first half of this year — not including shootings by cops and those ruled to be in self-defense — found more mixed results.

The cities saw 122 killings, up from 120 in the first half of 2016, 107 in the first half of 2015 and 100 the year before that. The counts remain low historically, though — there were 147 in the first half of 2012, and far more in past decades.

San Jose saw improvement from January through June, with 14 killings compared with 25 the year before. Homicides rose in San Francisco from 26 to 34, and in Oakland from 28 to 33.

Fremont’s homicide drought stands out, and it comes even though the city has one of the lowest ratios of police officers to residents among California cities.

But it tracks with progress in other areas: From 1995 to 2015, total violent crimes — which include robberies, assaults and rapes — fell 72 percent in Fremont, compared with a decrease of 45 percent statewide. Property crimes are down as well, though not quite as as dramatically.

“Everything we do is founded on the strength of the relationship we have with the community,” said Police Chief Richard Lucero.

He and other officials noted the city’s sprawling surveillance systems, which built up over the past several years and might have caused a bigger privacy furor if they were in another city. Fremont not only uses video cameras but also mounted 11 automated license-plate readers that collect information at major exit points from the city.

The residents of Scott Creek Terrace, meanwhile, banded together to buy cameras after a series of break-ins.

Referring to the license-plate readers, Lucero said, “That’s based on our research that’s indicated that in most of the serious crimes in the categories of robbery and burglary, the offenders enter our jurisdiction from some other jurisdiction and then leave. Obviously, we have offenders in our community, but the logic is pretty straightforward.”

Fremont officers have followed perpetrators to cities like Los Angeles and Sacramento to make arrests, said Tang.

It’s not clear, though, how much of Fremont’s gain in safety is a result of suppression and how much owes to demographic shifts.

According to U.S. census figures, the city has become older, with a median age of 37.6 as of 2015, compared with 34.5 in 2000. In that period, the median household income rose from $77,000 to $105,000, and the percentage of adults with high school degrees jumped from 60 percent to 92 percent.

The city has attracted a uniquely diverse group of people, many who work in technology or at local companies like Tesla. Residents identifying as Asian or Asian Indian grew by 61 percent from 2000 to 2015, according to the census, and now make up more than half of the population.

Nearly half the city is foreign-born. Fremont has growing Hindu, Sikh and Muslim communities. The Little Kabul neighborhood is the center of the nation’s biggest Afghan American enclave.

In Scott Creek Terrace, which sits along Interstate 680, the uniting creed is vigilance. Signs about the neighborhood’s crime watch are abundant, and cameras peek through red, white and blue garage awnings.

“It’s actually impressive,” Tang said as he drove through, waving to children playing in the driveway of a home.

Residents of the neighborhood put together a 41-page PowerPoint presentation to help other neighborhoods set up surveillance systems. The guide is available on the Police Department’s website.

The theme continues at Pacific Commons, a shopping center rife with hidden cameras and signs that warn of the presence of security officers, many of whom have Tang’s cell phone number. He said police work with business owners to set up both cameras and license-plate readers.

Fremont is expected to continue growing as city leaders develop plans for a downtown, a new civic center and more housing. Lucero said his department, which now has 195 sworn officers, will grow with it.

On a recent day, 50-year-old Kathryn Gomez, a resident for 28 years, strolled around man-made Lake Elizabeth, shielding herself from the heat with a sun hat.

The appeal of Fremont, she said, is its diversity, access to BART — and, of course, the low crime rate. She said she feels safe, but added that she set up a security camera to film the front of her home.

“It seemed like a sensible thing to do,” she said.

Sarah Ravani is a San Francisco Chronicle staff writer. Email: sravani@sfchronicle.com Twitter: @SarRavani