Officer helps homeless man struggling to shave "God's going to bless him for doing that for me."

A homeless man was struggling over a puddle on the street, trying to rinse off his razor and give himself a shave, when a Detroit police officer stepped in to lend a hand.

Jill Metiva Schafer happened to be walking by, and she captured the moment of kindness in a post on social media.

"I took the picture because I thought it was such a kind, unselfish thing for an officer to do," Schafer of Saginaw Township, Michigan, told "Good Morning America." "With all the negativity that police officers get, I wanted to show them in a positive light."

Schafer said she and her family had arrived for the Detroit Tigers game at the Comerica Park ballpark, but it got rained out. That's when she witnessed the exchange between Stanley Nelson, 62, and Officer Jeremy Thomas of the Detroit Police Department.

Thomas said he had no idea anyone was watching when he walked up to Nelson.

"I walked up and I said, 'Excuse me, sir' and at that point, he's like, 'Ok, ok, I'll leave and I said, 'No, do you need some help?'" Thomas told ABC affiliate WXYZ. "And he turned around blindly and said, 'Yes, thank you. God bless.'"

Nelson was attempting to shave after receiving a razor and shaving cream as a handout from a Good Samaritan.

"What he did for me, that was alright," Nelson told WXYZ of Thomas' gesture. "I really appreciate that because I'm going through my thing and I feel bad about myself, but I'm going to be alright."

He went on, "God's going to bless him for doing that for me."

Thomas' message is to help others whenever you can.