The gates were down and the horn of an oncoming Caltrain in Sunnyvale, California, warned motorists ahead. But not everyone appeared to heed the warning.
Fortunately for the man in the middle of the tracks in his car, some deputies happened to be in the right place at the right time.
A deputy was filmed jumping into action to drag the man out of the way just seconds before the train crushed his car.
At one point, the man appeared to be running with the officer off the tracks, but when he either fell or voluntarily dropped himself to the ground (neither of which is clear) the deputy dragged him the rest of the way.
Watch video of the rescue uploaded to YouTube by Karin Lizana:
KPIX-TV reported that authorities said the man appeared intoxicated at the time he was removed from the tracks.
"These deputies did not hesitate, they acted. Had they not acted, who knows what would have happened, I believe because of their actions, this person is alive today," Detective Salvador Zuno of the San Mateo County Sheriff’s Department told the news station.
Deputy Erick Rueppel, the man who ran onto the tracks in front of the train to pull the driver to safety, said he is "happy at the result" and is "glad we were [there]."
The driver, whose name was not released, suffered minor injuries, according to KPIX.
Watch the news station's report:
Here's another angle: