Former Glee actor Mark Salling pleaded guilty to a possession of child pornography charge in a Los Angeles federal court on Monday, Dec. 18.

Salling was charged with possession of child pornography involving prepubescent children.

In December 2015, police conducted a raid at his home after being tipped off by his girlfriend and arrested the actor after they found several child pornography videos and images on electronic devices in his home.

Salling's Plea Deal With Prosecutors

The actor, who played the jock Noah "Puck" Puckerman on the hit Fox show from 2009 through 2015, signed a plea deal with prosecutors in October. The agreement grants him a more lenient sentence in exchange for his admission of guilt.

The plea agreement states that investigators recovered more than 25,000 images and 600 videos of pornography involving young children from the 35-year-old star's computer and thumb drive. Some of the pornography in Salling's possession featured children as young as three years old being abused, according to court documents.

"Mark is focused on accepting responsibility and attempting to atone for his conduct," Salling's attorney Michael Proctor said in a statement obtained by People.

Plea Agreement Conditions

Salling's sentencing has been scheduled for March 7 and because of his admission of guilt, prosecutors will ask the judge to grant him a lighter sentence. Salling could still be facing a sentence of four to seven years behind bars after pleading guilty to the charge.

The other conditions of the plea deal are that Salling will have to register as a sex offender and check himself into a rehabilitation program. He is also prohibited from verbally or electronically communicating with anyone aged under the age of 18; maintain a 100-feet distance from schools, parks, public swimming pools, youth centers, playgrounds, and arcades; and pay each victim $50,000 as compensation.

Salling's Rape Accusations

This isn't Salling's first run-in with the law. In 2013, a woman accused the actor of sexual battery by forcing sex without a condom. The woman, Roxanne Gorzela, alleged that while they were dating in 2011, she consented to have sex with Salling but only on the condition that he used a condom.

Gorzela claimed that the actor completely ignored her demand and proceeded with sexual intercourse with her without a condom.

Last year, Salling was accused of raping another 22-year-old woman in 2012 after getting her drunk. However, The Los Angeles County District Attorney decided not to charge the actor with rape due to lack of evidence and a delay in the crime being reported.