A video has captured the moment an Ohio truck driver ran out of the way before the cab of his vehicle was smashed to pieces by an oncoming train. 

The incident happened in Versailles, a village north of Dayton, on Wednesday morning after the driver appeared to get stuck on the tracks. Footage recorded by a witness shows a railroad crossing gate first striking the roof of the driver’s compartment before lowering into the area between the cab and trailer of the truck. 

"Oh no, oh no," a man is heard saying as the driver steps out of the cab to see what happened. 

The driver then looks through the gap and starts running away. Seconds later, the train – with its horns blaring – smashes into the front of the truck, sending debris flying. 

TRAIN DERAILS IN COLORADO, SPILLS HUNDREDS OF GALLONS OF DIESEL FUEL 

Train collides with truck in Ohio

The train is seen smashing into the front of a truck in Versailles, Ohio. (Storyful/Isaiah Vanderhorst)

"Oh my God," the voice says repeatedly. 

Isaiah Vanderhorst, who recorded the video, told Storyful "I was filming a train with an engine that had a special paint scheme on it, from a distance in the parking lot of a bank, when a semi had pulled onto the track too far, and was hit by an oncoming train." 

The Village of Versailles Ohio EMS said on Facebook that "On arrival, units found a semi perpendicular to the tracks with heavy front-end damage and a large debris field." 

Truck driver avoids being hit by train in Ohio

The driver of the truck, on the right, is seen running away seconds before the truck was hit by the train. (Storyful/Isaiah Vanderhorst)

SMOKE WAS SEEN HOURS BEFORE NEW JERSEY CARGO SHIP BLAZE THAT KILLED 2 FIREMEN, CREW MEMBER SAYS 

"The train involved continued West down the tracks coming to a stop just East of the Conover Rd crossing," it added. "All occupants of the semi and train were accounted for and uninjured." 

First responders evaluated two people at the scene, where there was also a "large fuel and fluid spill from the semi," according to the Village of Versailles Ohio EMS. 

Debris field after train hits truck in Ohio

The debris field is seen following the collision in Versailles, Ohio. (Storyful/Isaiah Vanderhorst)

CLICK HERE TO GET THE FOX NEWS APP 

"There was also damage to the train engine which was repaired by CSX personnel," it said.