A police officer in Lodi, California yesterday rescued a man from a speeding train with only seconds to spare.

Bodycam footage released by the Lodi Police Department shows Officer Erika Urrea driving in her car when she sees a man in a wheelchair who appears to be stuck on the train tracks.

Ms Urrea jumps from her car and manages to pull the man out of his wheelchair, both falling to the ground as the train speeds past them.

The 66-year-old man suffered a leg injury and was taken to a local hospital, according to police.

"Officer Urrea risked her own life to save another and her actions prevented a tragedy today," Lodi Police Department posted on their Facebook page.

"We are extremely proud of Officer Erica Urrea and her heroism."