Generally speaking, catfishing can be viewed as a somewhat malicious act. Actively deceiving someone by posing as someone else for attention can result in spite and resentment from the deceived. However, catfishing can also be a useful tool in catching someone in a deceitful or malicious act, under the right circumstances.

That’s just what happened for a California police officer who was catfished by a college student.

The college student in question was 20-year-old Ethan, who wanted to catch potential predators in the act on apps like Tinder. He used Snapchat’s gender-swapping filter to take a picture of himself as a girl and created a Tinder profile to pose as a 16-year-old girl named Esther. Not long after setting it up, Ethan was contacted by a 40-year-old San Mateo police officer.

Officer Robert Davies found the profile and reached out to Ethan under the impression he was Esther. What followed was a back and forth between the pair, with Davies working to try and have the pair meet up. Eventually, Ethan reached out to San Jose Police to report Davies activity.

Davies was arrested Thursday for alleged communication with a minor with the intent to engage in sexual activity. The police report revealed that communication had been going for nearly a month and Davies acknowledged he was talking to a minor.

“This alleged conduct, if true, is in no way a reflection of all that we stand for as a Department, and is an affront to the tenets of our department and our profession as a whole,” San Mateo Police Chief Susan Manheimer said on Facebook.

Davies was booked into Santa Clara County Jail and is still in police custody.