Jennifer Lawrence (2)
Jennifer Lawrence, nominated for Best Actress for her role in "Joy," arrives wearing Dior Haute Couture at the 88th Academy Awards in Hollywood, California February 28, 2016. Reuters/Lucy Nicholson

The man accused of hacking celebrities’ iCloud accounts has pleaded guilty. Ryan Collins, from the city of Lancaster in Pennsylvania, US, struck a plea agreement for starting the so-called The Fappening, or the hacking of Apple and Google email accounts belonging to more than a hundred celebrities, including Jennifer Lawrence, Kate Upton and Kaley Cuoco.

The 36-year-old hacker agreed to plead guilty to a felony violation of the Computer Fraud and Abuse Act in the US. He also signed a plea agreement to one count of unauthorised access to a protected computer to obtain information.

He was charged Tuesday in Los Angeles, where many of the celebrities he victimised reside, but the parties agreed to transfer the case to the state of Pennsylvania in Harrisburg, near his home, for the guilty plea and sentencing. Once he enters the guilty plea, he will face a statutory maximum sentence of five years in prison. The parties have agreed to reduce the sentence to 18 months’ prison term, but it’s still unknown if the judge will consider it.

According to the press release from the US Attorney’s Office for the Central District of California, Collins engaged in a phishing scheme to obtain usernames and passwords for his victims from November 2012 to September 2014. He sent emails claiming to be from Apple or Google to ask victims to provide their usernames and passwords. From the information he has collected, he was able to access email accounts and obtained personal information, including nude photographs and videos of his victims. He also use a software program to download the entire content of his victims’ Apple iCloud backups.

The US Attorney’s Office, however, has not connected him to the actual leak of the hacked photos on the Internet.

“By illegally accessing intimate details of his victims’ personal lives, Mr Collins violated their privacy and left many to content with lasting emotional distress, embarrassment and feelings of insecurity,” the assistant director in charge of the FBI’s Los Angeles Field Office, said. “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 sceptical when replying to emails asking for personal information.”

Collins’ victims included celebrities, most notably Lawrence, whose nude photos were front and centre of the 2014 controversy known as the Celebgate or The Fappening. Late October 2014, private photos of “The Hunger Games” star were leaked online. It was said the photos originated from the imageboard site 4Chan.

Read: Jennifer Lawrence’s Nude Photos and Videos Leaked by 4Chan Hacker; Ariana Grande, Lea Michele, Mary Elizabeth Winstead, Kate Upton’s Also Included

Other celebrities whose private photos have been leaked included Mary Elizabeth Winstead, Lea Michele, Brie Larson, Kim Kardashian, Rihanna, Bar Rafaeli, Teresa Palmer and Ariana Grande.