Former “Glee” actor Mark Salling was arrested in 2015 for possession of child pornography. Two years later, the actor pleaded guilty.

A tip led to the arrest of Salling in 2015. Police received a tip saying that he possessed thousands of photos of children being sexually abused. BBC reported that the images were found on his laptop and on his hard drive after his residence was searched by the Los Angeles Internet Crimes Against Children Taskforce. He was eventually charged with two counts of receiving and possessing images of child sexual abuse, Variety reported.

More than 50,000 videos and images of child abuse were found on his computer, flash drive, and hard drive. He downloaded these and concealed his IP address using a software.

Salling’s plea bargaining agreement revealed

After Salling pleaded guilty to the charges against him, the 35-year-old actor now faces four to seven years behind bars. He was also ordered to pay around $50,000 to each of the victims. The $50,000 restitution will be given to the victims who have requested it. He initially faced two decades behind bars but because of his guilty plea with California’s district attorney, Salling will now be subject to 20 years of supervised release.

The agreement also said that he will have restrictions regarding contact with children below 18 years old as he will not be allowed to have any form of communication with anyone under 18 unless in the presence of parents or legal guardians.

The actor must remain at least 100 feet away from parks, playgrounds, public schoolyards, and other facilities related to children.

Salling will also register as a sex offender, E! News shared. He will also have to enter a treatment program for sex offenders, The Guardian revealed.

The “Glee” alum was weeks away from his trial regarding the child pornography case before he decided to plead guilty.

The plea agreement is yet to be accepted by the judge. In case the plea bargaining agreement will not be approved, the trial for October 17 stands.

Salling lost mini-series gig after charges

After Salling was charged with possession of child pornography, he lost his mini-series acting gig. He was supposed to star on “Gods and Secrets.”

Salling is best known for his high school jock role on “Glee” named Noah “Puck” Puckerman.

He starred in the Fox series from 2009 to 2015.

On top of the child pornography charges, Salling was involved in another issue regarding a woman who sued him for sexual battery because he allegedly forced her to engage in unprotected sex. He settled that lawsuit via paying the woman $2.7 million.