If you've been following the flurry of state legislation in recent years to punish sex offenders and prevent their future crimes, you'll want to know about an important federal court decision.

A judge in North Carolina has ruled unconstitutional a strategy of holding sex offenders indefinitely in mental hospitals after their prison terms are completed. The decision applies to a 2006 federal law, but clearly the decision could have implications for numerous state laws.

The "civil commitment" idea is nothing new. As long ago as 1991, The New York Times ran a story about a Washington State law headlined, "Strategy on Sex Crimes Is Prison, Then Prison."

But states have stepped up their efforts to keep sex offenders off the streets in recent years, putting the burden on sex offenders to prove that they are no longer dangerous or disturbed in order to get out of post-prison mental hospitals. They'll be watching closely any appeals to this new federal ruling.