A police officer in Richmond, Texas is being hailed as a hero after pulling a woman from railroad tracks to safety just seconds before a train sped past them.

CBS Houston reported that early Sunday morning a witness flagged down Officer Ramon Morales when a woman was spotted sitting on train tracks.

Morales, a former U.S. Marine, wasted no time and jumped out of his patrol car to rescue the apparently suicidal woman from an oncoming train.

"Without regard for his own life, he immediately went into action," said Richmond Police Spokesman, Master Sgt. Lowell Neinast via KTRK. "The second he pulled up, the crossing arms of the track started going down. He went straight into action. He did a great job and we're proud of him. He's a hero.”

The 27-year-old Morales has been on the force for 10 months. The entire incident was captured on his dashboard camera.

As for the unidentified woman he saved, she was transported to a medical center for an evaluation.