A terrorist attack on a Christmas market in Berlin on December 19 left 12 people dead and 56 others injured when a semi truck crashed through a dense crowd of people. Those numbers could have been much higher, according to German media, if the truck used in the attack didn’t have an automatic braking system that brought it to a halt after it detected a collision.

The truck stopped about 250 feet after it was driven into the market. It was originally thought that the truck’s injured driver halted its advance; now it seems that the vehicle’s autonomous braking system is to credit.

Automatic brakes are limited but useful. They only respond when a crash has been detected, which means they can’t halt a vehicle before it runs into something, but their ability to stop after the collision apparently made the attack on the Berlin market less effective than it otherwise might have been. They’re reactive, not proactive; that’s where more autonomous vehicles come in.

Self-driving vehicles stop before a crash occurs. They use a variety of sensors, from laser systems to mounted cameras, to sense when a car or truck is about to strike an object in their paths. The vehicle will then apply the brakes and employ other maneuvers to protect its driver and whatever else happened to be in danger — at least when the systems are working properly.

Many companies are working to make sure they do. Ford announced in October a new system that detects pedestrians using a combination of radar and video cameras. Information gathered from those sensors is run through an algorithm to let the car know when to stop.

Tesla’s applied the same principles to its Autopilot. The feature was shown earlier in December to predict a crash that most humans wouldn’t have seen coming. This allowed it to sound a warning chime to let its driver know something was about to happen.

Which isn’t to say Autopilot isn’t without its problems. Tesla CEO Elon Musk says the feature will allow self-driving cars to cross the country in 2017, but earlier this year, it came under fire after a fatal crash.

Still, it’s clear that semi-autonomous features like automatic brakes can help save lives even when someone’s purposely trying to hurt other people. With so many accidental deaths each day, and so many improved self-driving systems making their way through various R&D labs, attacks like the one that happened in Berlin should claim even fewer lives in the future.

Photos via Getty Images / Sean Gallup