A San Francisco area college student used a Snapchat filter to detect older men hoping to chat with teenage girls on social media outlets, leading to the arrest of a local police officer, NBC Bay Area reported Tuesday.

The 20-year-old, identified only by his first name, Ethan, said he used Snapchat’s gender-switch filter to take a picture of himself and pose as a teenage girl named “Esther” on the dating app Tinder.

The filter replaces his short black hair with long locks, flushed cheeks and a bit of eye makeup.

He used Snapchat’s “gender switch” filter to pose as a 16-year-old girl online, and take down a police officer allegedly looking to hook up. He tipped off the PD, and the officer was arrested.

Our exclusive interview with the man, and why he did it, at 11 on @nbcbayarea pic.twitter.com/VaGtg14uLL — Ian Cull (@NBCian) June 11, 2019

ADVERTISEMENT

Ethan said he was inspired to take action after learning that a female friend was sexually assaulted as a child.

One man messaged the supposed 16-year-old girl looking to hook up, the news outlet reported.

"I believe he messaged me, 'Are you down to have some fun tonight?' and I decided to take advantage of it," Ethan said.

Ethan said he messaged with the man for about 12 hours before moving the conversation over to Kik, a popular messaging app. Tinder requires users to be 18, so Esther’s fake profile said she was 19, according to a statement from the San Jose Police Department.

Once on Kik, Ethan, posing as Esther, told the man that she was only 16.

Screenshots of the conversation obtained by the outlet show the man told Esther that her age “might be an issue” before complaining “You won’t even send [any] pix of you.”

“I wouldn’t show anybody,” the older man promised when Esther said she was uncomfortable with sending pictures for fear of them landing on the internet.

“Whether or not the person is 16 is irrelevant,” San Jose Police Sgt. Enrique Garcia told KTVU. “If the suspect believes it’s a 16-year-old on the other end, the suspect should have terminated that conversation, specifically when it talks about engaging in sexual activity.”

Ethan told NBC Bay Area that he probed for bits of personal information so it would be easy “for the police to track him down.” He then turned screenshots over to police.

The tip reportedly led to the arrest of 40-year-old Robert Davies, a police officer with the nearby city of San Mateo, last week.

Davies was arrested on suspicion of contacting a minor to commit a felony, which is a felony itself, and was booked into the Santa Clara County Jail, officials said.

"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 in a statement to the outlet. “As San Mateo police officers, we have sworn an oath to serve and protect our communities. I can assure you that we remain steadfast to this commitment to serving our community with 'Professionalism, Integrity, and Excellence.' "