RALEIGH, N.C. — Fresh from a trip to traffic court, Lester Packingham Jr. celebrated his turn of good fortune by announcing to friends on Facebook that his pending ticket was dismissed.
‘‘No fine. No Court costs. No nothing. Praise be to God. Wow. Thanks, Jesus,’’ Packingham wrote in a 2010 post that led to a lawsuit being heard by the US Supreme Court on Monday.
Packingham, 36, was forbidden by a 2008 North Carolina law from using commercial social networking sites like Facebook that children could join. That’s because he’s a registered sex offender who was convicted of indecent liberties with a minor when he was 21. He served 10 months in prison.
A Durham police officer investigated Packingham’s post and determined he used an alias rather than his real name. Packingham was prosecuted, convicted of a felony, and received a suspended prison sentence. His lawyers say no evidence pointed to Packingham using Facebook to communicate with minors or that he posted anything inappropriate.
Now the Supreme Court’s task is deciding whether the law, meant to prevent communications between sex offenders and minors via social media, is so broad that it violates the Constitution’s free-speech protections.
The case reaches the Supreme Court after it was upheld by North Carolina’s highest court in a divided ruling. The law addressed websites that might allow sex offenders to gather information about minors, state court said. But dissenting justices argued the ban extends further and could outlaw reading The New York Times and Food Network sites.
Groups including the libertarian Cato Institute and the American Civil Liberties Union argue the North Carolina law could ban sex offenders from online life that includes looking for jobs or reading the daily musings of President Trump, and is unconstitutional.
‘‘Everyday Americans understand that social media — which includes Twitter, Facebook, Instagram — are absolutely central to their daily life and how the First Amendment is exercised in America today,’’ said Stanford law professor David Goldberg, who will represent Packingham on Monday.
Though the intent of lawmakers may have been to block sexual predators from finding prey online, Goldberg said the law makes it a crime for someone on a sex-offender registry to say anything about any subject on social media.
‘‘That goes way, way too far,’’ Goldberg said. ‘‘It’s a crime to do anything, including what Mr. Packingham did, which was to say ‘God is good’ because he was victorious in traffic court.’’
Georgia, Kentucky, and Louisiana also have laws restricting sex offenders’ use of social media sites. Nine other states require offenders to disclose their online user names and profiles, according to the National Conference of State Legislatures.
‘‘We have to protect young people wherever they are, whether that’s at school, or at summer camp, or increasingly online,’’ said North Carolina Attorney General Josh Stein, whose office is defending the law. ‘‘This North Carolina law keeps registered sex offenders off of social networking websites that kids use without denying the offenders access to the Internet.’’