The Supreme Court ruled Monday a North Carolina law banning sex offenders from using social networking websites is unconstitutional.

Justice Anthony Kennedy authored the high court's opinion in Packingham v. North Carolina that decided the North Carolina law "impermissibly restricts lawful speech in violation of the First Amendment."

"By prohibiting sex offenders from using those websites, North Carolina with one broad stroke bars access to what for many are the principal sources for knowing current events, checking ads for employment, speaking and listening in the modern public square and otherwise exploring the vast realms of human thought and knowledge," Kennedy wrote. "These websites can provide perhaps the most powerful mechanisms available to a private citizen to make his or her voice heard."

"In sum, to foreclose access to social media altogether is to prevent the use from engaging in the legitimate exercise of First Amendment rights. ... 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."

The high court's decision served as a victory for Lester Packingham, who was convicted of taking "indecent liberties" with a minor and later posted messages on Facebook praising God for helping him avoid a traffic ticket. Packingham was subsequently arrested for violating the law the Supreme Court shot down on Monday.

While Kennedy's opinion for the Supreme Court was met with no dissent, the high court's conservative bloc authored a concurring opinion sharply critical of Kennedy's reasoning. Justice Samuel Alito penned the stinging concurring opinion, which Chief Justice John Roberts and Justice Clarence Thomas joined. Justice Neil Gorsuch did not participate in the consideration of the case.

Alito wrote he agreed with Kennedy's opinion for the high court because of the North Carolina law's "extraordinary breadth," but Alito refused to join Kennedy's opinion because of its "undisciplined dicta."

"The Court is unable to resist musings that seem to equate the entirety of the internet with public streets and parks," Alito wrote in the concurring opinion. "And this language is bound to be interpreted by some to mean that the States are largely powerless to restrict even the most dangerous sexual predators from visiting any internet sites, including, for example, teenage dating sites and sites designed to permit minors to discuss personal problems with their peers. I am troubled by the implications of the Court's unnecessary rhetoric."

Alito's concurring opinion continues to blast Kennedy's decision for its "loose rhetoric" and wrote the Supreme Court ought to be "more attentive" to how its language regarding the differences between cybserpace and the physical world.

"The Court is correct that we should be cautious in applying our free speech precedents to the internet," Alito wrote. "It is regrettable that the Court has not heeded its own admonition of caution."