SACRAMENTO, Calif. — California could eventually join the European Union in requiring all new cars to alert drivers when they break the speed limit, a proposal aimed at reducing traffic deaths that would likely affect motorists across the country should it become law.

The federal government sets safety standards for vehicles nationwide, which is why most cars now beep at drivers if their seat belt isn’t fastened. A bill in the California Legislature — which passed its first vote this week in the state Senate — would go further by requiring all new cars sold in the state by 2032 to beep at drivers when they exceed the speed limit by at least 10 mph.

“Research has shown that this does have an impact in getting people to slow down, particularly since some people don’t realize how fast that their car is going,” said Sen. Scott Wiener, a Democrat from San Francisco and the bill’s author.

The bill narrowly passed Tuesday, an indication of the tough road it could face.

Republican Sen. Brian Dahle said he voted against it in part because he said sometimes people need to drive faster than the speed limit in an emergency.

“It’s just a nanny state that we’re causing here,” he said.

While the goal is to reduce traffic deaths, the legislation would likely affect all new-car sales in the country. That’s because California’s auto market is so large that automakers would likely just make all of their vehicles comply with the state’s law.

California often throws its weight around to influence national — and international — policy. It has set its own emission standards for cars for decades, rules that more than a dozen states have also adopted. And when California announced that it would eventually ban the sale of new gas-powered cars, major automakers soon followed with their own announcements to phase out fossil-fuel vehicles.

The technology, known as intelligent speed assistance, uses GPS technology to compare a vehicle’s speed with a dataset of posted speed limits. Once the car is at least 10 mph over the speed limit, the system would emit “a brief, one-time visual and audio signal to alert the driver.”

It would not require California to maintain a list of posted speed limits. That would be left to manufacturers. It’s likely that these maps would not include local roads or recent changes in speed limits, resulting in conflicts.

If the system receives conflicting information about the speed limit, the bill says, it must use the higher limit.

The technology is not new and has been used in Europe for years. Starting later this year, the European Union will require all new cars sold there to have the technology — although drivers would be able to turn it off.

Last year, the National Transportation Safety Board recommended that federal regulators require all new cars to alert drivers when speeding. The NTSB has no authority and can only make recommendations.