ST. PAUL, Minn. (AP) — A federal judge who ruled Minnesota's sex offender program unconstitutional is warning state leaders he may resort to a "more forceful solution" if they don't prove willing to fix the program on their own.

U.S. District Court Judge Donovan Frank issued a strongly worded order Wednesday, two days after he held a private hearing with top officials about changing the confinement program. He scheduled a public hearing on Sept. 30 and asked parties to the legal case to come with remedy proposals.

More than 700 offenders deemed sexually dangerous are being held indefinitely in secure treatment facilities. Frank ruled in a class-action lawsuit that the program is flawed.

Lawmakers, including Governor Mark Dayton, maintain it is legal. Frank says continued resistance to change could put the program at risk.