A Minnesota case that reached the U.S. Supreme Court in 1940 was the first to test the legality of committing sex offenders to mental institutions.

In Pearson vs. Probate Court of Ramsey County, the court upheld Minnesota's 1939 Psychopathic Personality statute, which the state went on to use infrequently to confine exposers, window-peepers and other mostly nonviolent offenders for treatment before release.

Since the early 1990s, when Minnesota and other states began using such laws to confine sex offenders beyond their prison sentences, the U.S. Supreme Court, in a series of close decisions, has given qualified approval to the practice. The court said that as long as the commitment is for treatment, it does not constitute double jeopardy (punishing someone twice for the same crime), or ex post facto punishment (retroactively increasing someone's prison sentence).

The court also held that the offender must have a history of being dangerous and a mental impairment serious enough to inhibit self-control. Critics have argued that it's inconsistent for the civil system to find that someone lacks control after the criminal system has found him guilty of a crime that requires intent or control.

Minnesota courts struggled with the issue in the case of killer- rapist Dennis Linehan. In 1994 the state Supreme Court struck down his commitment as a psychopathic personality, saying he didn't have an "utter lack" of control over his behavior, as the 1939 law required.

In response, the Legislature quickly passed the Sexually Dangerous Persons Act. The Supreme Court approved Linehan's recommitment as an SDP, saying that law required only that an offender be unable to "adequately control his or her behavior."

Linehan clearly had that inadequacy, the court said, though critics argued that the same could be said about nearly every criminal.

Writing for the majority in 1999, then Chief Justice Kathleen Blatz said, "The state long has had the power to civilly commit certain persons in narrow circumstances. ... [Linehan] lacks adequate control over his sexual behavior and merits commitment under the SDP Act."

Justice Alan Page dissented, saying that by the majority's "tortured" reasoning, the state could commit as many sex offenders as it wanted. "Every individual who is dangerous, whether or not they are dangerous beyond their control, becomes subject to preventive detention," Page wrote.

Quoting Thomas Paine, Page said that more was at stake than the fate of a few sex offenders:

"'He that would make his own liberty secure must guard even his enemy from oppression; for if he violates his duty, he establishes a precedent that will reach to himself.'"