CARROLL Co., Md. (WJZ) — A former Carroll County Public Schools teacher pleaded guilty Tuesday to production of child pornography.

Officials said Kenneth Brian Fischer, 40, has been in custody since Sept. 13, 2017.

According to Fischer’s plea agreement, Fischer was identified by law enforcement after he communicated with an undercover agent posing as a minor. This was done on a social networking site geared toward gay and bisexual men. Fischer then tried to arrange a meeting with the “minor” to engage in sexually explicit conduct.

Officials executed a search warrant at Fischer’s home and seized various electronic devices. They said a search on a cell phone revealed that Fischer had been communicating with five real minors beginning in November 2014 and continuing through his arrest in Sept. 2017.

Authorities said Fischer admitted to enticing young boys for sexually explicit conduct and that he took images and videos to document the encounters. He also tried to entice two other boys to engage in similar activities. Fischer talked online with at least nine boys where he either attempted to or did obtain sexually explicit photos. One was 13 years old at the time.

Fischer will be required to register as a sex offender.

Officials said if the court accepts the plea agreement, Fischer will spend a mandatory minimum of 15 years in prison and a maximum of 25 years. He will also be required to pay $5,000.

Fischer’s sentencing hearing was scheduled for May 20, 2019 at 3 p.m.

Follow @WJZ on Twitter and like WJZ-TV | CBS Baltimore on Facebook