San Francisco recorded the lowest number of traffic fatalities in the city’s history last year, a welcome decline that city officials largely credit to sustained investments in street-level safety measures and public awareness campaigns.

The 20 traffic-related deaths that occurred in San Francisco in 2017 mark the fewest number of people killed on city streets since 2010, when there were 24 deaths. It’s also 10 fewer deaths than the 30 that occurred in 2016 and the 31 recorded in each of the prior two years. The city first began counting fatal collisions in 1915, when there were 68 fatalities. The highest number of deaths — a staggering 158 — occurred in 1927.

Since 2014, efforts to reduce fatal traffic incidents on San Francisco’s streets have centered on the city’s Vision Zero SF program. The ambitious initiative, championed by former Mayor Ed Lee, seeks to eliminate all traffic fatalities by 2024 through a combination of intensive data analysis, street engineering projects, public-safety campaigns and smarter police enforcement of traffic crimes.

Last year may have brought the city closer to that goal than ever before, but officials involved in Vision Zero say there’s much more work to be done.

“We’re four years into Vision Zero and we’re starting to see a small decrease in fatalities — and that’s great,” said Tom Maguire, the director of the San Francisco Municipal Transportation Agency’s Sustainable Streets program. “But it’s going to take a continued commitment from everyone in the city to build on this progress year after year.”

The MTA, Maguire said, has focused on reducing excessive speeding, which he called “the No. 1 thing that causes fatalities and injuries on our streets.”

Last year, the agency implemented more than 700 projects, many of which are intended to slow motorists, including installing speed humps, recalibrating the timing of traffic signals and increasing visibility at crosswalks. MTA is also working on improving traffic safety in concert with major street improvement projects under way at Van Ness Avenue, Polk Street and Second Street, Maguire said.

The San Francisco Police Department conducted 61 different “speed enforcement operations” in areas of the city known to be hot spots for traffic collisions, according to Cmdr. Teresa Ewins. Such efforts have grown since Vision Zero began, she said, but added that the department has also ramped up its public outreach efforts to promote safe driving and to encourage pedestrians to stay alert while walking.

“Our role involves a lot more talking than it used to,” Ewins said. “It’s really about reaching out to the community. We’re such a diverse city, how do we reach everyone, in every language, so they understand how they can be safe and to find out what they need?”

In San Francisco, about 75 percent of all serious traffic-related injuries and deaths take place on just 13 percent of the city’s streets — a collection of corridors that city officials refer to as the High Injury Network. The network was first mapped out by the Department of Public Health in 2015 as a way to help officials identify the most perilous streets using data gathered from police reports. For the first time last year, the department began linking that data with reports on traffic injuries pulled from city hospitals in order to deepen the city’s understanding of where collisions are taking place and how serious the injuries tend to be.

“It really helped us capture some injuries that, for a number of reasons, weren’t included in the police reports,” said Megan Wier, a co-chairwoman of the Vision Zero task force and director of the Health Department’s Program on Health, Equity and Sustainability. “What that helps us do is make sure that we’re capturing the most severe injuries using the clinical assessments. That helps provide the best possible data ... so we can be efficient with our resources,” Wier said.

Historically, the highest number of fatal collisions in San Francisco involve pedestrians, with 14 of the 20 deaths involving individuals on foot last year. By contrast, four people were killed while riding a motorcycle last year and two were killed while cycling. Seven of the fatal pedestrian collisions involved older adults.

According to the MTA’s most recent report on collisions, between 2012 and 2015, 14 injury incidents occurred at the intersection of Fifth and Market streets downtown, making it the most dangerous intersection for pedestrians across that stretch of time.

San Francisco’s declining traffic fatality figures are at odds with the broader national picture for traffic deaths. Between 2015 and 2016, the National Highway Traffic Safety Administration recorded a 5.6 percent increase in fatalities nationwide.

For San Francisco, 2017’s historically low number of traffic deaths “is hopefully just the beginning of a very long-term decline in fatalities,” Maguire said. “This is not a victory lap. The only acceptable number is zero.”

Dominic Fracassa is a San Francisco Chronicle staff writer. Email: dfracassa@sfchronicle.com Twitter: @dominicfracassa