Former 'Glee' star Mark Salling has pleaded guilty to possession of child pornography.

The 35-year-old actor - who played the part of Noah 'Puck' Puckerman on the popular TV series from 2009 until 2015 - now faces the prospect of spending between four and seven years in prison, while he has also been ordered to pay around $50,000 to each of his victims.

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 possibility of spending 20 years behind bars.

However, Salling has entered into a plea deal with California's district attorney, thereby ensuring his prison sentence won't be as long as previously suggested.

Under the terms of his agreement, Salling will be subject to 20 years supervised release, while he will also face strict restrictions on his contact with under-18s, TMZ reports.

Mark initially denied the claims against him, but prior to pleading guilty, he was cut from the superhero-themed TV action series 'Gods and Secrets' after being indicted on the child pornography charges.

In a statement, director Adi Shankar said at the time: ''He has been cut from the mini-series, I will personally be paying for the reshoots, and I hope that Mark finds inner peace.

''Furthermore, a percentage of profits from the project will go to a charity for abused children.''