Mark Salling has pleaded guilty to possession of child pornography. Picture: Bang Showbiz

Mark Salling pleaded guilty to possession of child pornography on Monday, and faces between four and seven years in prison.

The former 'Glee' star entered the plea in a Los Angeles federal court on Monday after striking a plea deal in October which saw prosecutors and the actor agree to ask a judge to sentence him to between four and seven years behind bars. 

Salling - who could've faced up to 20 years with a maximum sentence - will be sentenced in March, according to TMZ.

Prosecutors say more than 50,000 child porn images were found in his possession. 

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

The 35-year-old actor - who played the part of Noah 'Puck' Puckerman on the popular TV series from 2009 until 2015 - is currently out on bail. 

The disgraced TV star was first arrested back in December 2015, when police were given a tip off that he was in possession of images of children being abused.

And following a police investigation, thousands of inappropriate images were ultimately found on his computer.

Subsequently, he was charged with two counts of receiving and possessing images of child sexual abuse in May last year, which meant he was facing the possibility of spending 20 years behind bars.

But in October he entered into a plea deal with California's district attorney. 

Under the terms of the agreement, Salling will be subject to 20 years supervised release, and is expected to face strict restrictions on his contact with under-18s.

He will also have to register as a sex offender and pay around $50,000 in restitution to each of his victims.