LINCOLNTON (AP) — Police say a North Carolina teacher has been arrested in an undercover operation on charges of trying to solicit an underage girl for sex.

News agencies report Lincolnton police say 41-year-old Ricky Kelvin Carpenter Jr. was arrested Wednesday and charged with soliciting a minor for an illegal sex act.

Police say a Carpenter contacted a detective posing as a teenage girl on an Internet site. Investigators say Carpenter, who thought the detective was a teenage girl, discussed meeting to have sex.

Carpenter was arrested after arriving at an apartment complex to meet the minor.

Media outlets say Carpenter was a teacher at Pumpkin Center Intermediate School.

Lincoln County School officials say Carpenter is on administrative leave.