CENTERVILLE, Utah – A Utah Highway Patrol trooper and a Utah Transit Authority train operator were both being recognized Wednesday in a dramatic rescue in which a man was pulled from a car on the train tracks just seconds before impact.

At around 6:50 a.m., UHP trooper Ruben Correa pulled off of I-15 just north of Parrish Lane and started running toward the tracks.

“He was in danger and I had to get him out as quickly as possible,” Correa said.

When Correa reached the car, he said he found the driver unconscious and suffering from an apparent medical problem.

At that point, there were only 25 seconds before impact — which is when train operator Riley Nelson said he noticed a light around the tracks, realized a car was there and threw on the emergency brake.

“(I) prayed that I was wrong and I wouldn’t hit anything,” Nelson wrote in a Facebook post.

At that moment, Correa was in a race against the clock and he worked desperately to wake the driver.

“You’ve got to get out of here!” Correa could be heard exclaiming on the dash camera video of the ordeal. “There’s a train coming! We’ve got a train coming! We’ve got a train coming!”

Correa said he finally had to grab the man and go.

“Just as they went out of view, I saw the trooper physically haul the guy out of the car barely even a second before impact,” Nelson wrote.

UTA Releases Train Camera From FrontRunner Vs. SUV Crash YIKES! We just got this video from UTA. It's the dash video from the FrontRunner train involved in yesterday's crash. The operator was able to slow the train down enough to give the trooper an extra few seconds to save the unconscious driver of the SUV stuck on the tracks! Posted by KSL 5 TV on Thursday, October 17, 2019

The driver told KSL he wound up with a sore back but was grateful to have survived.

“God answered my daily prayer,” Nelson wrote. “Every morning, I pray to Heavenly Father and ask that He protect me and all those around and on my train. This morning, I know He did, and I thank Him for that.”

UTA spokesman Carl Arky said by immediately hitting the emergency brake, Nelson was able to slow the train to 30 mph on impact and bought some critical seconds for Correa.

“If he had made the decision seconds later, it would have been a disastrous outcome,” Arky said.

Correa said he was happy he was in a position to save the man.

“The train hit the vehicle and the vehicle flew about 30 feet in front of us, and that’s when I realized, ‘oh wow, that was a lot closer than what I would have liked,’” Correa said. “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.”

He said he didn’t feel the weight of the situation until he saw the train hit the SUV, pitching it off the tracks.

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

The man in the vehicle declined to be interviewed. He did mention he’s a little shaken up, but he’s feeling OK and grateful to be alive.

LIVE: UHP holds press conference after train vs. auto crash LIVE: Utah Highway Patrol is holding a press update after a trooper saved a man's life before a FrontRunner train collided with a vehicle in Davis County Posted by KSL 5 TV on Wednesday, October 16, 2019

KSL TV’s Felicia Martinez, Sam Penrod & Andrew Adams contributed to this report.