A tourist was visiting Times Square on Nov. 14 when she spotted a shoeless homeless man asking for change.
Jennifer Foster was about to approach the man when she saw an NYPD officer come up to him.
"Right when I was about to approach, one of your officers came up behind him," Foster wrote in a message to the NYPD. "The officer said, 'I have these size 12 boots for you, they are all-weather. Let's put them on and take care of you.' The officer squatted down on the ground and proceeded to put socks and the new boots on this man."
Foster, who is the manager of the Pinal County Sheriff's public safety communications center in Arizona, said she has never been so impressed in her life.
That police officer, who has since been identified as Officer Lawrence DePrimo, did not know Foster was watching and that she took a photo.
The NYPD posted Foster's photo on their official Facebook page on Tuesday. Since then, it has been "liked" over 540,000 times and shared over 198,000 times, making DePrimo an Internet hero. The picture shows DePrimo kneeling down next to the barefoot homeless man.
When DePrimo saw that the homeless man was shoeless in the cold night, he asked him his shoe size, went to a nearby Sketchers shoe store and bought him some all-weather boots and socks, paying $75 out of his own pocket.
He then put the socks and shoes on the man's feet. DePrimo, 25, says it was a great moment and he's so glad to have the picture for the rest of his career.
DePrimo joined the NYPD in 2010 and lives with his parents in Long Island. He says he keeps the receipt for the boots and carries it with him as a reminder of those less fortunate.
ABC News contributed to this report.