The "Celebgate" scandal in 2014 saw nude photos

A US man was charged in relation to one of the biggest celebrity hacks in which a phishing scheme led to nude photos of Hollywood stars being posted online.

Edward Majerczyk, 28, of Illinois, agreed as part of a deal with federal authorities in Los Angeles to plead guilty to one felony count of unauthorized access to a protected computer to obtain information in what became known as "Celebgate" in 2014.

The scandal saw nude photos of models and actresses such as Jennifer Lawrence and Kate Upton published online, although none of the celebrities hacked by Majerczyk were named in the plea deal.

He faces up to five years in federal prison once he enters his guilty plea in Illinois, where his case is being transferred, prosecutors said.

According to the plea agreement, Majerczyk, between November 2013 and August 2014, illegally accessed the Apple iCloud and Gmail accounts of more than 300 people, including at least 30 celebrities, stealing their videos, photos and naked selfies.

Prosecutors said he snared his victims by sending them emails that appeared to be from internet service providers, directing them to a website that collected their usernames and passwords.

Once Majerczyk had hacked into his victims' iCloud and Gmail accounts he had access to a trove of sensitive photographs and videos, authorities said.

However they added that there was no evidence linking Majerczyk to the actual leak of nude pictures of celebrities that were posted online in September 2014.

"This defendant not only hacked into email accounts -- he hacked into his victims' private lives, causing embarrassment and lasting harm," said Deirdre Fike, the deputy head of the FBI's Los Angeles office. "As most of us use devices containing private information, cases like this remind us to protect our data."  

Another Pennsylvania man -- 36-year-old Ryan Collins -- also pleaded guilty in the case in May.