ST. PAUL, Minn. (AP) — Gov. Mark Dayton says he is willing to postpone his trade mission to Mexico to appear in a federal court over the state's embattled sex offender treatment program.

A federal judge last week ruled the secure civil confinement program for more than 700 offenders was unconstitutional. Judge Donovan Frank summoned Dayton and other state leaders to his courtroom in mid-August to begin fashioning a remedy.

Dayton said Wednesday if the court date isn't moved he will attend rather than go on the trade trip. Dayton says he believes the program is constitutional and favors an appeal if one is allowed.

The sex offender program involves people who are indefinitely detained in a medical setting once their prison sentences are complete.