.@SMCSheriff Deputy Erik Rueppel alerted oncoming Caltrain to slow down. "I don't think there was time to be scared." pic.twitter.com/jPWCoiLlcf — Lilian Kim (@liliankim7) August 4, 2015

.@SMCSheriff Deputy Lance Whitted pulled driver to safety from oncoming train. "This is what we're trained to do". pic.twitter.com/uJAWxSlpP7 — Lilian Kim (@liliankim7) August 4, 2015

Caltrain strikes unoccupied vehicle in #Sunnyvale. Deputy pulls driver out of car before collision. #mapit pic.twitter.com/9oFyy4XT77 — Lilian Kim (@liliankim7) August 4, 2015

.@SMCSheriff deputy is a hero, pulls driver out of car before train collision. #Sunnyvale — Lilian Kim (@liliankim7) August 4, 2015

.@SMCSheriff deputy heroes who saved driver's life in train collision. Pulled him to safety. #Sunnyvale pic.twitter.com/kHI6GSCYWt — Lilian Kim (@liliankim7) August 4, 2015

SUNNYVALE, Calif. (KGO) -- Two San Mateo County Sheriff's deputies are being hailed as heroes after they rescued a man from an oncoming train. They pulled a man to safety just seconds before an oncoming train crashed right into his car.The incident happened on Monday around 6:30 p.m. at North Mary Avenue and West Evelyn Avenue in Sunnyvale. The deputies saved that driver's life with only seconds to spare.A witness posted a video to YouTube that captures the incredible rescue. It shows a deputy escorting the driver away from a car, which crashed into a pole and onto the tracks, moments before.As the two are walking away, the driver fell to the ground. The deputy pulls the driver to safety just before a Caltrain collides into the car."This is what we're trained to do. Luckily, we were at the right place at the right time," Dep. Lance Whitted said.Whitted is the San Mateo County deputy seen in the video. His partner, Dep. Erik Rueppel, was on the tracks waving to the oncoming train to slow down. Those precious seconds likely made all the difference.Neighbor Sally Giulie saw the mangled car as it was being taken away. She said the driver wouldn't have survived the collision with the train. She said, "There was barely any formation of the car that was smashed up."The driver is believed to have been under the influence, which may explain why the deputies had to remove him from the vehicle.The deputies say they were just doing their jobs."I don't think there was time to be scared. You just do things as safe as you can, respond and that's it. It kind of just happens," Rueppel said.The driver was taken to the hospital for minor injuries.It's a fortunate ending, thanks to two deputies who were ready when it counted most.