SECAUCUS, N.J. — A New Jersey Transit police officer is being hailed as a hero after rescuing a man who was lying on the train tracks in Secaucus earlier, CBS New York reports.

According to authorities, New Jersey Transit officer Victor Ortiz climbed down from the platform at the terminal in Secaucus after reports of a man lying in the tracks on Friday, Aug. 26.

CBS2’s Hazel Sanchez reported Ortiz followed the man he saw exiting the train on the platform as the man ran and jumped on the tracks.

Officer Victor Ortiz CBS New York

Officials say the man struggled against Ortiz’ attempts to help him, but was eventually pulled out of danger.

Get Breaking News Delivered to Your Inbox

Ortiz said he had no time to think about himself when he struggled to pull the man off the tracks.

“At that point he’s like, ‘I just want to die, I just want to die,’” Ortiz explained. “He pretty much went down on his knees and down on his arms. At that point I said, ‘You’re not going to die, you’re not going to die.’”

Video of the incident shows Ortiz pulling the man from danger seconds before an oncoming train pulls into the station.

“NJ TRANSIT could not be more proud of Victor Ortiz and of the New Jersey Transit Police Department and we hope this serves as a stark reminder of what these men and women do every single day to keep us safe throughout this state,” New Jersey Transit said in a statement Sunday.

Ortiz said he had to make a split-second decision.

“I saw the train rapidly approaching and in an instant I said to myself, ‘I’m going to have to let this guy go because or he’s going to take me with him,’” Ortiz said. “It’s just a matter of seconds there. On the flip side, I said to myself, ‘Let me give one more tug on hopes I can pull him through.’”

New Jersey Transit riders were amazed by the officer’s heroics.

“He struggled with it, too. He struggled with it. He was really trying to get him off and it was not easy,” said Tom Munzer of Rivervale, New Jersey. “He put his own life in danger right there. He put his own life in danger and he deserves a lot of recognition.”

Julia Timpanero of Parkridge said cops don’t get enough recognition.

“That’s incredible,” she said. “That’s really cool.”

It was not immediately clear why the man was on the tracks in the first place.

Police did not identify the rescued man or his condition.

Ortiz is now out of the country on vacation.