A Gwinnett County man thought he was messaging and seducing an underage girl, but he was actually talking to an undercover DeKalb County police officer the entire time, authorities said.

Alan Michael Thomas, 26, of Lawrenceville, went to an arranged meeting place Tuesday, where he expected to find a 14-year-old girl, DeKalb police said. However, he only met a pair of handcuffs and the undercover detective he allegedly had been sending explicit messages.

The detective was posing as the underage teen on a social media app, police said in a news release. Thomas began messaging the detective and is accused of trying to convince the person, who he thought was 14, to meet him so he could take them home.

He planned to sexually abuse the child, according to police.

The name of the social media app was redacted from the police report obtained by AJC.com. The detective said he sent Thomas, who went by the username “Matt” on the app, 12 messages before they exchanged phone numbers.

During the ensuing string of text messages, Thomas asked whether she was in middle or high school, if she was a virgin and if she “liked older guys,” the report said.

“The suspect continued with sexually explicit conversation and then requested to meet with me for the purpose of engaging in sexual activity,” the detective wrote in the report.

The two agreed to meet at a McDonald’s, the report said. The address was redacted. His phone was seized as evidence along with a handgun and a small amount of marijuana that was in his car, the report said.

After Thomas was arrested, he admitted to the messages, saying that “he wasn’t sure that the female was real but advised that if he arrived at the location and the female was real, he would have allowed her to perform oral sex on him even if she was 14 years old,” the report said.

He faces three felony charges, including statutory rape, aggravated child molestation and utilizing an electronic device to seduce, solicit or entice a child, according to records. Thomas also faces a misdemeanor marijuana possession charge.

He is being held in the county jail without bond.

In other news: