August 4, 2015 4:15 PM EDT

A driver barely escaped from his car—with the help of a couple of sheriff’s deputies—mere seconds before it was hit by a train in the northern California town of Sunnyvale.

The driver, who police said was drunk, was “yanked” to safety. The rescue was captured in shocking surveillance video, shown blow, which may be disturbing to some.

The video shows Deputy Lance Whitted pulling on a stumbling man, who falls, as the train approaches; the deputy is able to dragging him to safety just as a Caltrain commuter train crashes into the car, crumpling the front half. Another deputy, Erik Rueppel, was also on the scene and notified track authorities of the situation.

“If it had not been for the deputies being at the right place at the right time, the driver would have been significantly injured,” San Mateo County Sheriff’s spokesman Salvador Zuno told NBC Bay Area.

The driver is under investigation.

Write to Tanya Basu at tanya.basu@time.com.

Read More From TIME

Related Stories

EDIT POST