Actor Mark Salling has struck a plea deal in his child pornography case.
The Glee star pleaded guilty Wednesday to possession of child pornography involving a prepubescent minor and will be sentenced to four to seven years in prison, according to court documents obtained by The Blast.
Salling, 35, has to register as a sex offender and enter a treatment program; have no verbal or electronic contact with anyone under the age of 18; stay 100 feet away from schools, parks, public swimming pools, youth centers, playgrounds and arcades; and pay $50,000 in restitution to each victim, according to the documents.
Salling was arrested in December 2015 after investigators said the laptop, a hard drive, and a USB flash drive seized from his residence allegedly contained thousands of images and videos depicting child pornography. (His former girlfriend called police, according to the court documents.) In May 2016, he was named in a two-count indictment alleging he received porn involving young girls. But the trial was delayedthat June as he sought new legal representation.
He played jock Noah “Puck” Puckerman on the hit Fox show from 2009-15. He did not immediately respond to PEOPLE’s request for comment.
This article originally appeared on PEOPLE.