When a Cleveland, Tennessee, police officer was seen buying groceries for a family at Walmart, a fellow shopper used the power of social media to help identify and thank him.

Related: 3 Police Officers Take On Kids In The Arcade Room

"Just witnessed an another extraordinary act by our men and women in uniform," the unnamed bystander wrote in a post that was later highlighted on the department's Facebook page. "A police officer paid for the groceries of a customer here at Walmart. The best part, the customer told the police officer 'God bless you' and he police officer responded 'I am already blessed.' I love you," the fellow shopper wrote on Facebook.

After the post was shared numerous times, police department got wind of their employee's generous act.

"Scrolling through random Facebook posts and then see this one that makes us ALL proud to be Cleveland police officers," the department wrote. They got a description of the officer and said after hearing he was "6'5 and buff" they were able to narrow down the search. "[We] deducted it was School Resource Officer Mike Kelly," the department said.

Officer Kelly said he was working a security job at Walmart when he noticed a familiar face in line. He saw the man's card get declined and jumped in to help, he told local reporters.

"I just felt God telling me -- saying 'Just go help him. We're getting extra money to be [here].' And I'm just like 'Are these people going to go hungry when I'm just sitting here making a little extra money for myself?'" Kelly said.

Kelly said he paid for the groceries to encourage others to do random acts of kindness.

"It is guaranteed that Kelly wouldn't want the credit from this, but it's these random acts of kindness that inspire US ALL to be kind to others!" the Cleveland Police department wrote.

Follow WFMY News 2 on Facebook and Twitter

► Make it easy to keep up to date with more stories like this. Download the WFMY News 2 App: Apple Users, Android Users