ST. PAUL, Minn. (WCCO) — The state of Minnesota is trying to figure out what to do with more than 700 sex offenders that a federal court ruled are being held unconstitutionally.

That was the subject of a closed door meeting today with the Governor, top state legislators and a federal judge. Among the topics discussed: Releasing some offenders, putting others in residential treatment facilities across the state and regular evaluations of the offenders.

READ MORE: Former Minneapolis Superintendent Bernadeia Johnson Fighting Stage 5 Kidney Disease

The preliminary cost to taxpayers is estimated at $20 million a year, for the foreseeable future.

The state is says it’s pursuing a dual track plan. Gov. Mark Dayton is vowing to appeal the ruling that says the program is unconstitutional, but he and elected officials are also moving forward with a plan to make the changes that a judge is expected to order in the next few months.

Gov. Dayton emerged from the hearing with a promise to fight the ruling.

“We believe our state law is constitutional,” he said.

Still, he made it clear that the state has already estimated the cost of moving many offenders to residential treatment centers.

“We did guesstimate at about $15 million a year that — in addition the assessments — to either build facilities or lease retrofit,” he said.

READ MORE: Ex-Soldier's Company Works To Provide Security, Peace Of Mind For Churches

Gov. Dayton estimated that another $7 million year would be needed to evaluate offenders and pay for their legal costs.

Within months, Judge Donovan Frank is expected to issue an order requiring the state to begin releasing some of the 700 offenders at Moose Lake and St. Peter and putting others in residential facilities. But a state appeal could delay those changes for more than a year.

Dan Gustafson represents the offenders.

“It’s very frustrating to my clients, because they hear the judge say in June that the program is unconstitutional, and now we are in August and nothing has changed,” he said.

Lawmakers say any court ordered fix will put the legislature in the position of having to approve tens of millions of dollars to put sex offenders in less restrictive settings — a problematic task for an election year.

“It starts to become a campaign issue, and I think this would be unfortunate if this played out as one of the major campaign issues,” Senate Majority Leader Tom Bakk said.

MORE NEWS: Police: Boy's Body Found In Trunk Of Car In Mound, 2 Arrested

Worrying about voting on the issue, legislators even discussed mounting an advertising campaign to inform the public about the predicament they’re in, and that they’ll be forced to vote on the issue via court order.

Esme Murphy