Cop Pulls Man From His Car Just Seconds Before It's Hit By a Train

A police officer dragged the man from his car after it became lodged on train tracks in Sunnyvale, California on Monday.

A sheriff's deputy pulled a man to safety just seconds before his car was struck by a train.

Incredible footage taken by a witness shows the deputy dragging the man from his car after it became lodged on train tracks in Sunnyvale, California on Monday evening.

Just seconds later, a horn from a Caltrain blares as the train barrels down the tracks. It strikes the man's empty car and forces it to spin off the tracks.

Officials say no one was hurt in the incident.

"If it had not been for the deputies being at the right place at the right time, the driver would have been significantly injured," said San Mateo County Sheriff's spokesman Salvador Zuno.

He said that deputies Lance Whitted and Erik Rueppel were in the area when they heard a crash and saw a vehicle had collided into the crossing guard at the tracks.

Meet Deputies Whitted & Rueppel. They pulled a man to safety and saved a life. #heroes #thank you @SMCSheriff

— Caltrain (@Caltrain_News) August 4, 2015

Big shout out to @SMCSheriff deputies on scene who were able to pull the driver from the vehicle, preventing a possible tragedy. #thankyou

— Caltrain (@Caltrain_News) August 4, 2015

The duo ran to the scene. One was able to notify the incoming train as the other pulled the man to safety.

"I believe because of their actions this person is alive today." Zuno said.

Read: Trooper Asks Girl if Her Dad Should Get Speeding Ticket, Her Response is Priceless

The driver appeared to be under the influence, Zuno said, NBC4 reported. Caltrain tweeted that the man was a "possible drunk driver."

The department is investigating the incident.

Service in the area has now been restored.

Watch Below: Cop Rescues Baby Skunk Running in Circles with Head Stuck in Container