A middle school student sat crying in the hallway of his school building. But instead of allowing the child to suffer alone, a Phoenix school resource officer took a seat on the floor of the student to comfort him.

Edna Guerrero took the photo of officer Rusty Baubie and posted it on Facebook, where it has been liked thousands of times.

In the post, Guerrero called the moment "tender mercy" and that Baubie is humble and has a heart of gold, Patch reported.

She said that the unidentified student was “having a difficult time, was screaming and inconsolably crying, saying sad and negative things about himself.”

Baubie spoke to the boy, telling him that he mattered, is important and loved. He also told the student that everyone makes mistakes but those mistakes don’t define anyone and that you have to move on.

>> Read more trending news

>> Need something to lift your spirits? Read more uplifting news

A spokesperson for the Phoenix Police Department told Yahoo Lifestyle that Baubie was there at the right time.

“Office Baubie was going about his daily duties when he came across a young student leaving the school administrative office,” Sgt. Armando Carbajal, said. “The boy was traumatized, so Baubie lent an ear and tried to calm him down.”

“Police officers are there to provide safety and to teach,” Carbajal said of the Baubie. “But this was one duty that you can’t put on paper.”

Baubie is a 13-year veteran of the police force, a father and has been married for 27 years.