That sexual encounter has landed Mr. Anderson in a Michigan jail, and he now faces a lifetime entanglement in the legal system. The girl, who by her own account told Mr. Anderson that she was 17 — a year over the age of consent in Michigan — was actually 14.

The case came to the attention of the police after the girl’s mother contacted them, concerned about her whereabouts. They were at her home when the girl returned, according to The South Bend Tribune. A few weeks later, the paper said, the police visited Mr. Anderson, who cooperated and, in February, turned himself in. He was arrested and charged and, after pleading guilty to fourth-degree criminal sexual conduct, was sentenced to 90 days in jail and probation.

As an Indiana resident, Mr. Anderson will most likely be listed on a sex offender registry for life, a sanction that requires him to be in regular contact with the authorities, to allow searches of his home every 90 days and to live far from schools, parks and other public places. His probation will also require him to stay off the Internet, though he needs it to study computer science.

Some advocates and legal authorities are holding up Mr. Anderson’s case as the latest example of the overreach of sex offender registries, which gained favor in the 1990s as a tool for monitoring pedophiles and other people who committed sexual crimes. In the decades since, the registries have grown in number and scope; the nearly 800,000 people on registries in the United States go beyond adults who have sexually assaulted other adults or minors. Also listed are people found guilty of lesser offenses that run the gamut from urinating publicly to swapping lewd texts.

As Mr. Anderson’s defenders see it, his story is a parable of the digital age: the collision of the temporary relationships that young people develop on the Internet and the increasing criminalization of sexual activity through the expansion of online sex offender registries.