A man who previously worked as a principal at school districts in Austin, Westlake and Round Rock, Texas, has been arrested in Arizona after law enforcement accused him of soliciting young girls for sex, the Phoenix-area Pinal County sheriff's office said.

Karl Waggoner was arrested Tuesday near Four Peaks Elementary School, the Phoenix-area school where he had just begun his job as principal this summer, the Sheriff’s Office said. Waggoner is charged with luring a minor for sex, Arizona records show.

Waggoner spent nine years as West Ridge Middle School’s principal in the Eanes school district before he was reassigned to be Westlake High School’s assistant principal in 2012. He worked for a time as Anderson High School’s associate principal, and in 2014, the Round Rock school district hired him to be Hopewell Middle School’s principal until 2016, when the Round Rock district named him the associate director of administrative projects.

Authorities said they found online ads believed to have been posted by Waggoner soliciting young girls to go skinny dipping with him at his home, the Sheriff’s Office said. After finding this, a Pinal County Sheriff's Office detective conducted an undercover investigation, pretending to be a 14-year-old girl, and began communicating with Waggoner.

Waggoner engaged in "sexually inappropriate conversations" and "discussed engaging in sexual acts" with the undercover detective and provided sexually explicit photos, the Sheriff’s Office said.

The sheriff’s office in Arizona is working with Texas law enforcement agencies to investigate whether Waggoner may have committed similar acts there, the sheriff’s office said.

Waggoner is still an employee with the Arizona school district but is not performing any job duties for the district while the investigation continues, the Arizona school district wrote in a letter to parents. An assistant principal at a nearby school will take over Waggoner's job.

"Even up until this weekend, Mr. Waggoner was posting ads online soliciting young girls for sex," Pinal County Sheriff Mark Lamb said in a statement. "Waggoner held a position of trust, spending decades educating middle and high school students in Texas. We are working with those law enforcement agencies to see if there are any victims out there. Considering the evidence, we are grateful we were able to arrest Waggoner and keep him from victimizing children in our county."