A British student, who hacked into Facebook’s computers has been sentenced to eight months in prison.

A prosecutor said 26-year-old Glenn Mangham hacked into the social networking company’s computers from his bedroom last year and stolen “invaluable” intellectual property.

Prosecutor Sandip Patel told a London court the attack “represents the most extensive and grave incident of social media hacking to be brought before the British courts.”

Mangham had argued that he was merely trying to show the Palo Alto, California-based company how to improve its security.

But Judge Alistair McCreath said on Friday the software development student’s actions had “very serious potential consequences.”