Internet lists of convicted high-risk sex offenders are legal — but those that include the names of convicts who long ago completed their sentences may not be for much longer.

The Supreme Court on Tuesday agreed to hear an appeal from the state of Alaska, which has a sweeping sex-offender law that a federal appeals court overturned part of last year as unconstitutional.

About a dozen other states have laws that will be affected by the Supreme Court's decision.

All states have some version of New Jersey's "Megan's Law," named after the young girl who was molested and killed by a neighbor in 1994. The laws require that the names and addresses of dangerous sex offenders be published as a matter of public safety.

The case hinges on the concept that it is unconstitutional to punish someone twice for the same crime. When Alaska's law was first passed in 1994, it was made retroactive by 10 years, ensuring that many offenders who had completed their sentences would suddenly be on the state's public list.

A 1998 expansion of Alaska's law required convicted offenders to give their names and addresses to the state as often as four times per year, and made failure to comply a crime.

Two Alaska men, identified only as John Does I and II, along with one of the men's wife, challenged the retroactivity portion of the law as unconstitutional.

John Doe I was convicted of sexually abusing his daughter when she was between 9 and 11 years old. He was sentenced to eight years in prison and was released in 1990. John Doe II was convicted of sexually abusing his daughter when she was 14. He was also sentenced to eight years in prison and released in 1990.

The Does lost the first round in federal court in 1999, but the San Francisco-based 9th U.S. Circuit Court of Appeals reversed that ruling last year. Alaska's law was unconstitutionally punitive when applied retroactively, the appeals court found. The court pointed in particular to the publication of the men's names on the Internet.

"In Alaska, information as to all sex offenders is made available worldwide on the Internet, without any restriction and without regard to whether the individual poses any future risk," the appeals court wrote.

"Broadcasting the information about all past sex offenders on the Internet does not in any way limit its dissemination to those to whom the particular offender may be of concern."

The appeals court found that the Alaska Legislature intended the sex-offender registry to be a boon to public safety, not punishment. The way the law worked in practice made it unconstitutional, the appeals judges said.

The case is Otte v. Doe, 01-729.

The Associated Press contributed to this report.