RALEIGH, N.C. (AP) — The North Carolina Supreme Court has upheld a state law prohibiting registered sex offenders from using social networking sites such as Facebook.

The state's highest court issued an opinion Friday that reversed a lower court ruling that found the law unconstitutional.

The 2008 law was challenged by registered sex offender Lester Gerard Packingham, who was convicted of an additional offense after Durham police found his Facebook page.

His attorney had argued the law was too broad and could prohibit routine Internet activity, such as a Google search.

Packingham was convicted in 2002 of taking indecent liberties with a child. For his 2012 conviction related to the Facebook page, he received a suspended sentence and probation.

A lawyer for Packingham didn't immediately return a message seeking comment.