HAMMOND, Ind. (CBS) — A former algebra teacher at a Hammond high school has been arrested for allegedly convincing several underage girls to send him sexually explicit photos with their cell phones.

Jon Erik Lilly, 27, was arrested Wednesday, charged with possessing visual depictions of a minor engaging in sexually explicit conduct. He is due back in court on Friday for a detention hearing.

READ MORE: Chicago Weather: Heavy Rain, Possible Flood Watch

Lilly, a former algebra teacher at Morton High School, allegedly convinced at least four underage girls to sext with him, and send him naked or sexually explicit pictures of themselves.

Court records indicate the investigation began when one girl’s mother contacted police, suspecting Lilly was having a sexual relationship with her 17-year-old daughter.

The girl first denied having anything more than a platonic relationship, but later admitted she was having sex with Lilly for about four months.

READ MORE: Ed's Tech Notes: Walgreens New Drone Delivery, Amazon New Pay Option, Facebook Rumored Rebrand

Lilly denied having any sexual or physical contact with the girl, claiming they were waiting for her to turn 18.

The school had been aware of rumors the two were having sex, and a school administrator wrote up Lilly last November, after finding them together in his classroom, with the girl sitting between Lilly’s legs, according to court documents.

The school reported Lilly to police after two students claimed they knew Lilly and the girl were having sex.

At least three other students told investigators they sent Lilly naked pictures after he requested them.

MORE NEWS: Man Shot In Leg In West Rogers Park

Investigators found hundreds of sexually explicit photos on Lilly’s home computer. At least 10 different girls were in the photos, including at least four who were determined to be underage at the time the photos were taken.