This article was originally published on The Huffington Post by Mary Papenfuss on February 27, 2017.

Sex offenders in North Carolina not only have to register with their local communities once they’ve served their time ― they also have to stay off Facebook and other social media sites for 30 years. But the Supreme Court is expected to hear arguments Monday on whether that law violates the constitutional right to free speech.

The case concerns Lester Packingham, now 36, who was convicted of a felony in 2010 for having a Facebook account.

In 2002, when Packingham was 21, he pled guilty to taking indecent liberties with a 13-year-old girl. He said he was dating the girl and claimed he wasn’t aware of her age, NPR reports. He was given a suspended sentence and two years’ probation.

Packingham registered as a sex offender. Seven years later, he signed up for Facebook while living in Durham, North Carolina, to celebrate having a traffic ticket dismissed, according to The News & Observer. “Man God is good!” Packingham posted. “No fine, no court costs, no nothing spent…..praise be to GOD, WOW! Thanks JESUS.” A police officer spotted the post.

Packingham had no other arrests during that time, and police found no evidence of any other sexual offenses or that he had used Facebook to connect with young girls. He was convicted of a Facebook felony and placed on probation.

North Carolina officials say the law — which also bars sex offenders from services like Snapchat and Instagram, which can be accessed by children under 18 — is intended to stop predators from seeking out new victims. “It blinks reality to suggest that sexual predators do not use social media to further their crimes,” the state says.

“Sexual predators became increasingly adept at using social media to gather intimate information about minors’ social lives, families, hobbies, hangouts, and the like,” North Carolina Attorney General Josh Stein’s office argued in its brief. “They then used this information to target unwitting victims.” Thirteen states have joined a brief supporting the attorney general’s brief.

But Packingham’s lawyers say that the law is far too broad and punitive, especially given the central role the internet now plays in communication ― much more so than in 2002, when Packingham pled guilty to his crime. They argue that the law violates Packingham’s right to free speech.

“The statute excludes registrants from the central platforms where, today, any North Carolinian can interact with his elected representatives, obtain a free online education, and find gainful employment,” Packingham’s attorneys said in their brief.

The case deals with the unique situations of sex offenders. Even though they may have served their time and finished probation, and haven’t broken the law again, they remain under restrictions not placed on other criminals, because of the particular nature of their crimes and the fear that they will offend again. Not only must they register and remain on sex-offender rolls for several years, but they must abide by several other restrictions. They are often barred from working around children and living near schools, and in some cases they can’t use public parks.

There are close to 850,000 people registered as sex offenders in the U.S., with 20,000 registered in North Carolina.