A member of the cast of hit US television series Glee is facing seven years in prison after pleading guilty to child pornography charges.

Mark Salling, 35, played Noah "Puck" Puckerman in the show, which ran from 2009-2015.

He was arrested in December 2015 after a former girlfriend alerted police.

Federal investigators say they found more than 25,000 images and 600 videos depicting child pornography on computers and thumb drives that belonged to Salling. The content depicted children as young as three years old being abused, according to court documents.

On Tuesday Salling said in a statement that he was “pleading guilty because I am guilty of the charges”.

He made a deal with prosecutors, pleading guilty to avoid spending up to 20 years in jail and a lifetime of supervised release.

If, as expected, it is approved by Judge Otis Wright II, the plea agreement with the acting US attorney that was filed on Tuesday in California also will see Salling having to register as a sex offender when he gets out of jail.

Upon sentencing, he also will pay $50,000 to each victim who has requested it.

He will have to “participate” in a treatment programme and stay away from venues frequented by minors such as schools and “video arcade facilities”.