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.

“Glee” star Mark Salling has admitted to possessing a massive cache of child pornography and agreed to spend up to 20 years in federal prison and register as a sex offender for life, federal court documents show.

In a plea agreement filed with the U.S. District Court for the Central District of California on Tuesday, Salling, 35, has agreed to plead guilty to one federal count of possession of child pornography stemming from an indictment filed last year.

Salling is best known for playing Noah “Puck” Puckerman on the show that ended in 2015.

In his plea agreement, the actor admitted to downloading more than 50,000 images of child pornography and erotica – sexualized images of children – on his laptop and another 4,000 photos and 160 videos of child pornography on a thumb drive. The content was downloaded from at least April through December 2015, according to the indictment.

Read the full story on LATimes.com