A man known as the “Spam King” has turned himself in after sending more than 27 million spam messages to Facebook users.
Sanford Wallace surrendered to FBI agents in California and has been charged with fraud.
According to the BBC, prosecutors allege he developed a program that circumvented Facebook spam filters and enticed users to submit their account details.
The software program posted messages on Facebook users’ walls - purportedly from friends - directing users to a website where their account details were then harvested.
The scam earned Wallace "substantial revenue," the charges say.
The program infected people’s friend’s lists, posting spam messages on their walls, allege police.
About 500,000 Facebook accounts were affected between November 2008 and March 2009, leading to more than 27 million spam messages being sent, prosecutors said.
Wallace denies the charges, which carry prison sentences of up to 10 years.
Wallace was charged with six counts of electronic mail fraud, three counts of intentional damage to a protected computer and two counts of criminal contempt.
According to the BBC, Facebook sued Mr Wallace in 2009 and a federal judge ordered him not to access Facebook's computer network. However, prosecutors say he repeatedly violated that order earlier this year.