A New Jersey police officer is being credited with "saving the life of a man who was unaware that an oncoming train was about to hit him," according to CBS News.

"Perth Amboy Police Officer Kyle Savoia's body camera captures footage of his life saving actions on Thursday, July 19, 2018, as he saved a man who was just moments away from being struck by a moving train," the department said in a post on Facebook.

The homeless man was checked into a local hospital for evaluation but was soon released.

He then went to police headquarters to thank Officer Savoia for saving his life.