A federal judge ruled Minnesota’s sex offender program unconstitutional Wednesday in a case closely watched by 20 other states with similar programs, The New York Times reported.

U.S. District Judge Donovan Frank said in a Star Tribune  article that the program was initially meant to treat offenders is now meant to punish.

Gov. Dayton disagreed with judge’s ruling, but his administration will have to propose changes or deal with a solution devised by the judge, reports the Star Tribune.

Since the program began 20 years ago, “not one civilly committed person has been outright released from treatment programs,” according to the Pioneer Press.

Wisconsin’s program has discharged 118 and put 135 on supervised release since 1994, according to the Star Tribune.

A civilly committed person costs $125,000 a year and Minnesota spent $80.9 million this year, according to The New York Times.

“It is fundamental to our notions of a free society that we do not imprison citizens because we fear that they might commit a crime in the future,” Judge Frank wrote in his opinion.