Mark Salling could be facing some prison time.
On Monday, the former Glee star pleaded guilty to a federal offense of possessing child pornography involving a prepubescent minor. This comes over a year after he appeared in a Los Angeles court for his arraignment and pleaded not guilty.
His formal sentencing has been set for March 7.
The terms of his plea agreement obtained by ET state that Salling could serve four to seven years behind bars followed by up to 20 years of supervised release with conditions decided by the court. If, for some reason, the judge imposes a sentence outside the agreed upon range, both parties have the option of pulling out of the plea deal.
Salling would also have to register as a sex offender and participate in psychological counseling and/or enroll in a treatment program.
In June of last year, the 35-year-old actor was indicted on two charges of receiving and possessing child pornography on his laptop computer, a hard drive and 16 gigabyte USB flash drive. Following his arrest on Dec. 29, 2015, Salling's devices were seized, and according to investigators from the Los Angeles Police Department, the items "contained thousands of images and videos depicting child pornography."
Days after Salling's indictment, he was fired from his gig on the miniseries Gods and Secrets.
Reporting by Steve Wilks.
EXCLUSIVE: Naya Rivera Says She Wasn't Shocked By Mark Salling's Child Pornography Charges: Here's Why
Mark Salling Fired From 'Gods and Secrets' Following Child Pornography Indictment
Mark Salling Spotted for the First Time Since Arrest for Possession of Child Pornography