LOGAN, Utah (ABC4) — A man was arrested on Friday for attempting to meet with a 13-year-old girl with the purpose of having sex, according to Logan Police.

Victor Manuel Davila, 27, faces charges of enticing a minor (second-degree felony) and rape of a child (first-degree felony).

On August 18, Davila started talking with an undercover officer online who he believed to be a 13-year-old girl, according to a probable cause statement. Police said the officer was attempting to find people who sexually exploit children in the community.

The officer reportedly received a chat request from Davila, who was listed as 26 years old on the application. Davila said he was visiting Logan from California and looking for “casual sex,” police said.

The officer, who had assumed the identity of a 13-year-old girl, began to talk with Davila and agreed to meet “for the express purpose of sex,” police said. Davila expressed to the officer that it was a risk, mentioning “narc cops” and “catching a case,” the affidavit states.

Police said the officer suggested that Davila not meet her for sex then, but Davila said that he still would.

A time and place was reportedly arranged, and officers lay in wait at the location. Davila then arrived and was arrested. Davila’s smartphone was searched after the arrest, where officers found his chats with the 13-year-old girl persona.

After admitting to being the person who spoke with the persona, stating the purpose was for sex, Davila reportedly told police that his actual intention was to “just talk to and educate the child,” and that he was a “good Samaritan.”

The charge of rape of a child is attempted, police said, as Davila took a “substantial step” towards actually performing the discussed sex act. While Davila resides out of state, he reportedly has ties to the community and travels frequently.

Davila was booked into the Cache County Jail on the charges previously stated.