The Pennsylvania man behind a 2014 hacking incident that saw hundreds of explicit photos and videos of celebrities leaked online has agreed to plead guilty to a felony computer hacking charge, according to a document filed by the Department of Justice.

36-year old Ryan Collins of Lancaster, Pennsylvania, broke into over 50 iCloud and 72 Gmail accounts, many belonging to famous female celebrities, between November 2012 and September 2014. After gaining access, Collins searched for and stole any explicit photos and videos, sometimes downloading a victim's entire iCloud backups.

At the end of this period of almost two years, the stolen images were leaked on anonymous image board Anon-IB before finding their way onto sites such as 4Chan and Reddit. The incident became known as 'Celebgate' or 'The Fappening.'

At the time, many people claimed the hack was a result of either brute-force iCloud password attacks or a vulnerability in the system, something Apple denied. It now seems that the Cupertino company was being truthful; Collins used email phishing scams where he posed as Apple or Google employees to trick account holders into revealing their usernames and passwords.

The celebrities who had their nude images posted included Jennifer Lawrence, Rihanna, Scarlet Johansson, Gabrielle Union, Kim Kardashian, Hillary Duff, Jenny McCarthy, Kate Upton, Hope Solo, Victoria Justice and many others.

While Collins has pleaded guilty to a felony violation of the Computer Fraud and Abuse Act, no evidence has been found that he was the one who shared or uploaded the stolen images and videos.

"By illegally accessing intimate details of his victims' personal lives, Mr. Collins violated their privacy and left many to contend with lasting emotional distress, embarrassment and feelings of insecurity," said the FBI's David Bowdich.

"We continue to see both celebrities and victims from all walks of life suffer the consequences of this crime and strongly encourage users of Internet-connected devices to strengthen passwords and to be skeptical when replying to emails asking for personal information."

Collins could serve up to five years incarceration for his crime, but authorities are recommending 18 months. He may spend even more time behind bars, as "that recommendation will not be binding on the sentencing judge."

Image credit: Tinseltown / Shutterstock