The Supreme Court on Monday ruled that a North Carolina law banning registered sex offenders from social media sites like Facebook and Twitter is unconstitutional.

The case was brought about by Lester Gerard Packingham. In 2002, Packingham - then a 21-year-old college student - had sex with a 13-year-old girl and ultimately pleaded guilty to "taking indecent liberties with a child." As a result, he was required to register as a sex offender which, among other restrictions, barred him from accessing commercial social networking sites.

In 2010, Packingham had a traffic ticket dismissed and boasted about the event on Facebook. This garnered the attention of the Durham Police Department which led to Packingham being indicted by a grand jury for violating the social media ban. He appealed the conviction on the grounds that it violated the First Amendment all the way up to the Supreme Court.

Justice Anthony Kennedy wrote in the court's decision that this is one of the first cases the court has taken to address the relationship between the First Amendment and the modern Internet.

Kennedy said that to foreclose access to social media altogether is to prevent the user from engaging in the legitimate exercise of First Amendment rights. The Justice added that even convicted criminals - and in some instances, especially convicted criminals - might receive legitimate benefits from these means for access to the world of ideas, in particular if they seek to reform and to pursue lawful and rewarding lives.

Photo courtesy Getty Images