The Facebook logo is shown at Facebook headquarters in Palo Alto
Facebook logo REUTERS

Self-proclaimed "Spam King," Sanford Wallace of Las Vegas, Nev., pleaded not guilty in federal court on Thursday, according to a report.

Earlier in the day, Wallace turned himself in to agents of the Federal Bureau of Investigation, the U.S.Department of Justice said.

On July 6, a grand jury indictment accused Wallace of sending more than 27 million spam messages to Facebook users, the Associated Press Reported.

Wallace pleaded not guilty in court on Friday to nine counts related to e-mail fraud, computer damage and criminal contempt.

He faces up to 40 years in prison if convicted, the report states.

He has been accused of sending messages to trick people into providing their passwords, the indictment said. In total, he accessed 500,000 Facebook accounts in 2008 and 2009.

The indictment on criminal contempt charges alleges he violated a 2009 court order to ban him from using Facebook.