An investigation into a Marion County high school teacher charged with sexual assault began after the girl said she accidentally uploaded pictures to a teen app, deputies say.

Jason Michael Tarlton, 30, a teacher at Lake Weir High School, was arrested Tuesday and is accused of an inappropriate relationship with a 17-year-old female student he used to teach, Marion deputies said Wednesday.

Deputies said a Sheriff's Office school resource officer was made aware of inappropriate images uploaded to the "After School" app that showed Tarlton interacting with the girl in a sexual manner. One image showed them in front of a hotel mirror, deputies said.

Detectives then contacted the girl, who told them she accidentally uploaded the pictures from her phone. She said she was no longer a student at Lake Weir but last year had Tarlton as a teacher, and she admitted to a sexual relationship with him, detectives said.

She also told them that Tarlton told her he loved her and that if he were caught, she was "worth it."

When detectives went to Tarlton's home, a freshly printed copy of Florida statute 948.30 was sitting on the passenger seat of his vehicle, they said.

The statute discusses probation and community control involving sex offenses.

Tarlton posted $10,000 bond on charges of sexual assault on a minor and has been released from the Marion County Jail.