In a major blow to civil liberties, an appeals court has upheld the Minnesota system that civilly commits sex offenders after they've served their prison terms, a confinement from which only one person has ever been fully released. The decision, filed Tuesday, used the wrong legal standard, making it too easy for the state to lock people up indefinitely for future dangerousness. Worse, the U.S. Supreme Court might not review the decision, despite its being egregiously wrong, because there is no clear disagreement among the circuit courts.

The Minnesota Civil Commitment and Treatment of Sex Offenders Act, enacted in 1994, says any county attorney can ask a state district court to determine that a person is "sexually dangerous" or has a "sexually psychopathic personality." If the court agrees that the county attorney has demonstrated this by clear and convincing evidence, the person is committed indefinitely, against his or her will, to a "secure treatment facility."

There is no regular review to see whether the person should be released. The only way to get out is for the confined person to ask a review board to determine that he or she is no longer dangerous.

Minnesota maintains three facilities for civilly committed sex offenders. Two are "secured," meaning they are enclosed like prisons. The third, while still mandatory, is outside the fence of one of the other sites.

Since 1994, 714 people have been committed, according to the decision. Amazingly, just one has been fully released. Three people have been provisionally discharged from the program. In essence, Minnesota's civil committal program is a one-way ticket to permanent confinement.

To be clear, this confinement happens only after sex offenders have been convicted of crimes and served their full sentences. The theory isn't that they're being punished, paying their debt to society. It's that they are being confined because they pose a continuing danger to others.

In 1997, the Supreme Court upheld a Kansas post-conviction civil committal statute that required a finding of future dangerousness. In doing so, the court emphasized that the law required a new hearing every year at which the state had to prove dangerousness beyond a reasonable doubt. It said the confinement therefore wasn't indefinite.

A federal district court thought the Minnesota program was different. In 2015, it held that the program violated the constitutional due process rights of those committed.

The essence of the district court's logic was that if the state is going to confine people against their will, it has an obligation to provide regular evaluation and review. It found that although in theory the law allowed for less restrictive means of keeping an eye on offenders, in fact the system kept people locked up even if they were no longer dangerous. And it said the treatment program was a mess with no meaningful relationship to eventual release.

The state appealed, and a panel of the U.S. Court of Appeals for the Eighth Circuit reversed the district court's judgment. Two of the judges on the panel were George W. Bush appointees. The third was appointed by Bill Clinton. The opinion was written by Judge Bobby Shepherd, one of the Bush appointees.

And it's a pretty upsetting opinion to read. The appeals court rejected the district court's idea that the Minnesota law must satisfy strict scrutiny, the highest level of judicial analysis. The lower court reasoned that the Minnesota law takes away personal liberty by locking people up indefinitely without regular review. The 14th Amendment to the Constitution says that you can't be deprived of life, liberty or property without due process of law. The lower court thought that not being locked up indefinitely for a danger you might pose in the future counted as a fundamental interest — the kind that triggers strict scrutiny.

Yet the appeals court said that there is no fundamental liberty interest in not being locked up if you pose a significant danger to yourself or others. In support, the court cited a 1992 dissent by Justice Clarence Thomas in Foucha v. Louisiana. The case involved a Louisiana statute that detained people acquitted of crimes by reason of mental insanity even after they were no longer mentally ill.

In an opinion by Justice Byron White, the Supreme Court struck down the statute. White wrote that "freedom from bodily restraint has always been at the core of the liberty protected by the Due Process Clause from arbitrary governmental action." He added that the specific liberty at stake was the "liberty interest under the Constitution in being freed from indefinite confinement in a mental facility." That sounds a lot like the situation facing those committed under the Minnesota law.

Thomas was entitled to disagree in the Foucha case — but White's opinion is the law, not Thomas' dissent. The Eighth Circuit should have followed precedent, not Thomas' critique of precedent. (Thomas' claim at the time was that White's opinion never expressly said that a law that confines someone indefinitely in a mental facility must be subject to strict scrutiny. But that was the very strong implication of the court's decision, and in effect its holding.)

Under strict scrutiny, a law must serve a compelling state interest and be narrowly tailored to achieve that interest — including by using the least restrictive alternative. By abandoning that standard, the appeals court reasoned that the Minnesota law only needed to bear a reasonable relation to the purpose of protecting the public. The court deferred to the state Legislature's judgment, essentially rubber-stamping the indefinite confinement. For good measure, it held that the detentions were not an action that "shocks the conscience."

The Eighth Circuit panel's decision is wrong. It should be reconsidered by the whole court, and by the Supreme Court if necessary.

Noah Feldman is professor of constitutional and international law at Harvard University. This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.