COBB COUNTY, Ga. — "Get out of the car! There's a train coming!" officers frantically warn a man, moments before a train hit the car, in video posted to Facebook by Cobb County Police on Tuesday.

The video is from a July incident, in which the man was apparently asleep in his car on tracks near Paces Ferry Road in Vinings.

The video shows officers pull up to the tracks, where the car is stopped, before the railroad signals suddenly start ringing.

"Get him out of the car! Get him out of the car!" one officer immediately says.

They then yell into the car, trying to wake the man up.

"Hey man get out of the car! Get out of the car! There's a train coming!" one says.

"There is a train coming, you're on the tracks, get out of the car! Buddy, get out of the car!" says another.

According to the post, the officers broke a window to haul the guy out and get him to safety.

In the video, you can see people stepping off the track as a train blares its horn. Moments later, the train runs into the car.

"Without hesitating and fearing the male was in imminent danger, one of the officers shattered the driver’s side window which you’ll also hear in the video. This allowed the officers to extract the driver from the vehicle and get him to safety seconds before the train arrived and struck the vehicle," the department wrote on Facebook. "These officers put their own lives at risk to save this citizen, and to summarize this in a nutshell…….WOW."

It wasn't clear what led to the man sleeping in his car on the tracks.

OTHER 11ALIVE HEADLINES:

Sophie's Nightmare: How a Georgia mother allowed her boyfriend to impregnate her 10-year-old

Mother posted 'I could not ask for better children' before allegedly killing them

Gang members sentenced in 'the most horrific death' in recent county history