Former “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.


The trove was discovered after a woman Salling was involved with reported him to law enforcement. Salling had shown her his child pornography in the context of their sexual relationship, authorities said.

Salling has also agreed to register as a sex offender permanently and a lifetime of supervision if and when he’s released from federal custody. A future court date has not been set.

joseph.serna@latimes.com

For breaking California news, follow @JosephSerna on Twitter.