TiAnna Greene was taking her daughter to summer camp one recent morning when she witnessed an act of kindness that took her breath away.

While stopped at a traffic light, she saw a Florida police officer sit down on a street curb next to a homeless man and hand him some food and a cup of coffee.

“What really caught my attention was the fact she then pulled out food for herself and started to eat with him. She just seemed very, very comfortable,” Greene said. “I got my phone out and started snapping pictures because I was so overjoyed by the interaction.”

Greene posted the photos on her Facebook page, wanting to share with friends the stranger’s kind act, something “that seemed to come naturally for her," she said. The post went viral, particularly after the Ocala Police Department also shared the photos on social media.

RELATED: Policeman spends last day giving gift cards, instead of tickets, to community

“I didn't know who she was but I really wanted her to know that it touched me and I’m pretty sure it touched that gentleman,” said Greene, who was thrilled her 7-year-old second grader also got to see the gesture.

"I told my daughter, ‘See. That is truly a sign of compassion,’” she said. “It really brightened my day, and I actually had several good days after from that one encounter.”

Trending stories,celebrity news and all the best of TODAY. This site is protected by recaptcha

Sgt. Erica Hay Ocala Police Department

The Ocala Police Department identified the officer in Greene's photos as Sgt. Erica Hay, who told TODAY.com she was on her way to get breakfast at a local donut store when she noticed the homeless man.

“We’re not a large community so I know most everybody, especially the homeless in the area, but I didn’t know him," Hay said.

RELATED: Homeless man returns purse with $400 to single mom with cancer

“He was just there by himself alone, so I just grabbed food and went back to eat with him. Nobody wants to eat alone,” she said, adding: “I like eating with anybody.”

The Ocala Police Department posted images on Instagram taken by TiAnna Greene, which show an Ocala police officer sitting down at a gas station, having breakfast with a homeless man. The officer is identified as Sgt. Erica Hay. The police department states that she bought and shared a meal with the man. Ocala Police Department Public Information Office/Instagram

Hay downplayed her actions, explaining she just wanted to help someone whose life is a struggle daily.

“Isolation is the worst part about being someone who is homeless. They’re isolated from everyone, and I think any type of interaction is a positive thing,” she said. “He was great. He was nice to talk to. He’s got a story, just like everyone else. It just happens to be a sad story.”

Hay also tried to deflect attention back to Greene, with whom she has since become Facebook friends.

“TiAnna is an amazing lady. I’m glad she took a minute out of her day to share something positive about law enforcement,” Hay said. “I’m just glad that it’s helped others see police officers in a good way. We all need that.”

RELATED: Police officer helps woman who lost more than 200 pounds finish 10K race

But Greene said Hay, a 20-year police veteran, is the one who deserves all the recognition.

“I just really wanted her to know that it touched me and I’m pretty sure it touched that gentleman,” she said.

“I just wanted her to know that she was caught doing something nice and I really appreciated it. And it helped my daughter understand that not all police officers are bad, that there are good people in all positions. It just depends on who’s carrying it.”

Follow TODAY.com writer Eun Kyung Kim on Twitter.