Actor Mark Salling has pleaded guilty to possessing child pornography.

US media reports that, as part of a plea agreement, Salling admitted to owning around 50,000 images and 600 videos of children being sexually abused. According to court documents, the content depicted children as young as three-years-old being abused.

The 35-year-old, who is best known for starring as Noah 'Puck' Puckerman on the Fox dramedy Glee, faced up to 20 years in prison but is expected to serve four-seven years as part of the plea agreement, followed by 20 years of supervised release and registry as a sex offender.

Former "Glee" actor Mark Salling, right, arrives at federal court in Los Angeles (AP)

He will undergo a treatment programme, have no verbal or electronic contact with anyone under the age of 18, stay 100 feet away from schools, parks, public swimming pools, youth centres, playgrounds and arcades, and pay $50,000 in restitution to each victim, People reports.

Salling's collection of child pornography was discovered on a laptop, a hard drive and a USB after the actor showed some of the images to a girlfriend, who then reported him to police. He was arrested in December 2015.

Puck leads the Glee club in a rendition of Queen's Fat Bottomed Girls

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