“What I’ve done is morally reprehensible,” Stephen Kyle Goodlett said, apologizing to the victim and the judge before his sentencing in Louisville. “Your honor, I deserve to go to prison.”

Judge David J. Hale abided by the prosecutors’ recommendation, saying the sentence reflects both the seriousness of Goodlett’s crime and his cooperation with authorities. Upon release, Goodlett must serve 10 years of supervised release and register as a sex offender.

“Parents must be able to place their trust in educators to provide a safe learning environment for our kids,” United States Attorney Russell Coleman said in a statement after the hearing. “Mr. Goodlett not only violated this trust but exploited students for his own foul gratification. His significant punishment is well-earned.”

Goodlett, who pleaded guilty to transporting and possessing child pornography in the federal case, still faces more than 60 child porn counts involving many more victims in state court.

As a teacher at Elizabethtown High School south of Louisville and then principal of LaRue County High School for three years until he was fired in 2016, Goodlett was respected in his church and community. But prosecutors said he was covertly searching the confiscated student cellphones of teenage girls for nude photos, and saving them to thumb drives to be viewed, uploaded and traded on the internet.

His downfall came after a young alumna of LaRue County High learned that naked images she had taken for her boyfriend when she was 15 had been uploaded to a Russia-based pornography trading website. She went to Elizabethtown police, who called in federal authorities. They traced the images to an account registered by Goodlett, and then searched his devices.

A federal complaint says the initial police review of Goodlett’s devices found 60 examples of child pornography. Records show a more thorough forensic review found 436 images and 11 videos.

The National Center for Missing and Exploited Children identified images of the Elizabethtown woman, as well as a naked girl between 10 and 14 years old in Goodlett’s Dropbox account, according to a federal complaint.

As the investigation widened, state police asked students who had cellphones confiscated to get in touch.

After signing a waiver of his rights and agreeing to a recorded interview with state investigators, the former high school principal acknowledged finding the images on confiscated phones, transferring them and sharing them online, authorities say.

In addition to the criminal cases, at least 10 former students in LaRue and Hardin counties are suing Goodlett and the school districts, claiming they violated protections against unreasonable search and seizure and violated Title IX, the federal law prohibiting discrimination based on sex in education.

Attorney Joseph H. Mattingly III, who represents these young women, says they “have suffered great embarrassment and emotional distress” over photos that were disseminated after Goodlett confiscated their phones.

The judge said he reviewed letters written on Goodlett’s behalf, many asking him to temper justice with mercy. Many of the letters, which were redacted to remove names, described Goodlett as a good man who made horrible mistakes while in the throes of a pornography addiction.

Defense attorney Christopher Spedding said in court documents that Goodlett is getting treatment.

Goodlett said he wants to use his experience to help others break free from this addiction.

“I know what I’ve done is awful,” he told the judge. “I fully accept any punishment you hand down.”