Actor Mark Salling arrives at the premiere of Fox Television’s “Glee” at Paramount Studios on September 12, 2012. (Photo by Kevin Winter/Getty Images)

This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

LOS ANGELES — Former “Glee” actor Mark Salling reached a deal with prosecutors to plead guilty in a child pornography case.

The plea agreement filed Tuesday in federal court said the actor will plead guilty to possession of child pornography. In December 2015, Salling was arrested after the Los Angeles Internet Crimes Against Children Task Force searched his home.

Investigators found more than 50,000 images of child pornography on a laptop, hard drive and USB thumb drive seized from the residence, according to court records. He was indicted in May 2016. The investigation started on the state level and was later referred to federal authorities because of the size of his child pornography collection.

Under the terms of the plea deal, prosecutors will ask a judge to sentence Salling to a prison term between four and seven years. He agreed to pay $50,000 in restitution to each victim who requests it. He’ll also have to register as a sex offender and will face 20 years of supervised release.

Salling is best known for playing Noah “Puck” Puckerman on the Fox hit “Glee” from 2009 to 2015.