A California man was arrested after allegedly kidnapping a girl who, with the help of other female teens, lured the man — in an unofficial "sting operation" — to help expose him as an older man looking to sleep with underage girls.

Richard Dreyfus, 32, was contacted by a group of girls on social media and planned to meet up at a location in Vista. When at the spot on Sunday, Dreyfus convinced the 17-year-old girl, whom he allegedly kidnapped, to get into his vehicle to talk. Then he immediately drove away, officials said.

CALIFORNIA MAN SENTENCED AFTER FORMER ROOMMATE FOUND DEAD, BLUDGEONED INSIDE WALL

Dreyfus drove the girl several miles, the San Diego County Sheriff's Department said in a news release. During that time, the teen "was able to send a message for help to the group, who called law enforcement."

Deputies were able to call Dreyfus's cell phone and he pulled over. The teen quickly fled from his vehicle, investigators said, adding she was rescued "unharmed."

Dreyfus was arrested and charged with kidnapping, sending harmful matter to a minor and communication with a minor for specific offenses.

"There does not appear to be any relationship between the suspect and victim outside of their communication through social media," the sheriff's office said.

CLICK TO VISIT THE ALL-NEW FOXBUSINESS.COM

Investigators said they "strongly" discourage members of the public to try to catch criminals.

"These types of situations can be extremely dangerous and should be handled by your local law enforcement agency," officials said.

"The Sheriff's Department takes all crimes against our children extremely serious and is committed to keeping our children and communities safe. If you have information involving a crime, please report it to your local law enforcement agency."