SECAUCUS — An NJ Transit police officer is being hailed a hero by colleagues after dragging a man off train tracks with less than two heart-stopping seconds to spare before a commuter train barreled through.

The hair-raising rescue Friday morning near Secaucus Junction was caught on video — obtained exclusively by New Jersey 101.5.

The 22-second video shows Officer Victor Ortiz struggling to pull the man away.

The man had purposely lain on the tracks and struggled against Ortiz, even as the commuter train fast approached.

Officer Victor Ortiz (NJ Transit Police Department)

Officials say Ortiz, a 16-year veteran of the force, risked his own life to save the man, who has not been identified.

"Everyday when we put on our uniforms and go to work we do not know the situations that await us, and we must be prepared for anything," New Jersey Transit PBA Local 304 said in a statement.

"Without regard for his own safety, Officer Ortiz acted quickly and heroically and was able to pull a man from the train tracks just seconds before a train passed through. We commend Officer Ortiz for his bravery and heroism!"

NJ Transit officials did not immediately respond to a request for comment early Saturday afternoon.

NJ Transit police said Ortiz had been called to a commuter train on a report of the man having a confrontation.

The man walked off the stopped train and ran away. Ortiz gave chase on the station platform and then along the tracks before the troubled man planted himself on the tracks.

Other details were not available Saturday.

Also on New Jersey 101.5:

Sergio Bichao is deputy digital editor at New Jersey 101.5. Send him news tips: Call 609-438-1015 or email sergio.bichao@townsquaremedia.com.