A heroic Utah Trooper ignored a train bearing down on him to pull an unconscious driver from a car on the tracks early Wednesday — getting him free just one second before it would have killed them both.

Dramatic dashcam footage shows Highway Patrol Trooper Ruben Correa running up a small slope to a car on the tracks as the lights of the FrontRunner train can already be seen heading toward them.

“Get out of here — we got a train coming! We got a train coming!” he can be heard shouting in panic as he tries to move the unidentified driver.

Correa finally lifted him out, with them tumbling down the slope just a second before the train smashed through the stationary car, throwing it at least 30 feet ahead on the tracks near Farmington.

“That’s when I realized, ‘Oh wow, that was a lot closer than what I would have liked,'” Correa told KSL.

Neither the officer nor the driver — said to have had an unknown medical issue prior to the crash — were hurt, according to KSL.

“I’m still trying to process everything that happened,” the trooper told the site. “I’m just very grateful that I was able to get him out and he’s alive and he’s back with his family now.”

The officer insisted he was “just doing my job” — while his Colonel, Michael Rapich, took to Twitter to praise his “incredible and heroic action.”

“We are so grateful that the Driver and Trooper are safe after this extremely close call. Well done Trooper Correa!!!” he wrote.