The Illinois Supreme Court ruled Friday that the state has the right to detain convicted child-molesters, even after they have completed their prison terms.

David Samuelson, 53, had challenged the constitutionality of the Sexually Violent Persons Commitment Act put into effect by the Illinois General Assembly in January 1998.