As with most stray dogs, no one can say for certain how his life on the street began, but he managed to find a family all on his own. A few years back, he just showed up one day at a police post in the city of Petrópolis, Brazil. The cops he encountered there were immediately smitten by him, and they adopted the dog as one of their own.

He goes by several nicknames, but officially he's known as Xerife (Portuguese for "sheriff").

"They have put together a little house for him and they treat him with a lot of affection," Creuza Villardo Wurch, a neighbor, told The Dodo. "Xerife's loyalty to the police is amazing!"

As the cops at the post go about their business, Xerife likes to stay close by them, making sure everything goes smoothly and safely. The job Xerife loves the most, though, is helping to keep his fellow officers up-to-date on their policing skills — particularly, the pat-down search.

"All the officers train with him," Wurch said. "I have already witnessed these demonstrations many times. He has been doing this for a long time!"

Here's video of Xerife in action.

Xerife clearly is pleased to have found such a happy work environment with people who love him. In fact, early in his tenure with the police, one officer tried to take him home to make him a house pet — but he was having none of it. After escaping, he was later found back at his post.

"He seems very intelligent and is very happy to live there," Wurch said.