An elementary school teacher in Indiana allegedly turned private baseball lessons into masturbation sessions for a group of young boys, authorities said.

Joe Kimerer — a fourth-grade teacher at Amelia Earhart Elementary School in Lafayette — was collared Friday on a slew of charges that included vicarious sexual gratification with a child under 14 years old after investigators learned he had been coaching students through the sexual acts during private baseball lessons, according to a probable cause affidavit obtained by the Lafayette Journal & Courier.

Kimerer, 46, told the boys during some practices to go to the bathroom and masturbate before asking the students sick questions that included queries on the size of their penises, according to the affidavit. The sicko coach even contacted them at home to ask if they had “done their homework,” an alleged code phrase for questioning if they had masturbated.

Police in Lafayette said many of the alleged incidents dating back to the summer of 2014 happened inside the school during school hours. The most recent incident occurred Feb. 26, according to the charges.

Kimerer, a teacher for 18 years with the Lafayette School Corporation, had no prior disciplinary record, Superintendent Lee Huddle told the newspaper.

“It obviously is an unfortunate situation you hope would never happen,” Huddle said of the allegations against Kimerer, who was assigned to home duties last month.

Huddle said the reassignment, which occurred as school officials learned of the allegations, was the fastest way to remove Kimerer from the classroom. Procedures have begun to terminate his employment, Huddle said. The school’s principal notified parents of Kimerer’s arrest in an email Friday, characterizing the allegations as “very troubling.”

“The allegations are of the utmost gravity in that they implicate unprofessional conduct by a teacher towards a student,” principal Ryan Habben wrote. “While this report is alarming, we want every parent to know that we will continue to provide a safe and nurturing environment for all students.”

Kimerer’s name did not appear in the school’s staff directory as of Monday. Along with his nearly two decades as an educator, Kimerer had also worked as an assistant baseball coach at nearby Jefferson High School before resigning late last year.

Kimerer, who is married with two children, has acknowledged that some of the conversations he had with students had “gone too far,” WRTV reports.

Huddle, meanwhile, told WTHR that some parents and relatives of students in the district are in a “little bit of shock right now,” including Mike Tevis, who told the station he was stunned by the allegations.

“I don’t understand how someone in this position could be that kind of person,” Tevis told the station.

Investigators believe Kimerer may have victimized more students and have asked anyone with additional information to call (765) 807-1250.