A police officer in Massachusetts is getting national attention after a photo of her playing "Pokemon Go" with a young man was posted on social media.

"I commended her for whatever she was doing with him, then she said he was teaching her to play 'Pokemon (Go)'," Elizabeth Perez wrote on Facebook after posting a photo of the pair on Tuesday, hunched over and absorbed with the officer's cellphone.

"In the midst of (all) the hatred it was beautiful to see this interaction between them," Perez wrote.

Perez identified the officer as Officer Barberi and said the photo was taken in downtown Springfield.

"Not all cops are bad just like not all black children (despise) the law!" she wrote.