The former principal of an elementary school outside Phoenix has pleaded guilty to attempting to lure a minor for sexual exploitation after authorities say he had inappropriate conversations with an undercover officer posing as a 14-year-old girl.

The San Tan Valley Sentinel reported that 59-year-old Karl Waggoner on Friday reached the agreement in exchange for supervised probation for at least 10 years. He must also register as a sex offender and undergo treatment.

The former principal of Four Peaks Elementary School in Apache junction was arrested in September after authorities with the Pinal County Sheriff's Office say he posted an online advertisement soliciting sex.

Waggoner's attorney said his client's text conversations never resulted in a meeting, and Waggoner ended the conversation stating the teenager was too young for him.