JEFFERSON CITY, Mo. (AP)  An attorney for a man who served a 25-year prison sentence for rape argued Thursday that a Missouri law allowing him to be subsequently committed indefinitely to a mental institution as a “sexually violent predator” is unconstitutional.

The Missouri Supreme Court heard arguments from attorneys for Jay Nelson and the state about its sexually violent predator statute.

The law says that if prisoners have a “mental abnormality” making them act out in a sexually violent way, then they should be evaluated before they leave prison.

If a team of Department of Corrections and Department of Mental Health experts determine the prisoners still are dangerous, a judge can commit the offenders to a secure mental health facility following the completion of their criminal sentences.

People committed as sexually violent predators can”t leave the mental health facility until they are reviewed and deemed safe to be released.

Nelson was convicted of rape in 1989. While in prison, he was accused of sexually assaulting female guards.

The state subsequently classified Nelson as a sexually violent predator, and he was committed in 2015 to the Department of Mental Health until doctors determine he is safe for release.

Nelson”s attorney argued in the Supreme Court that the requirements for release, as set out in the statute, are impossible to meet. She said no person in Missouri committed to the program had been released after being committed as a sexual predator.

Nelson”s attorney, Chelsea Mitchell, said that the high-security facility where Nelson was sent is not an adequate environment for treatment.

She also disputed the language “sexually violent predator,” saying the term was inflammatory and could have affected the way jurors viewed Nelson during the hearing about whether to commit him to a mental health facility.

The state”s attorney, Gregory Goodwin, said the wording didn”t make any difference in the trial.

“The term sexually violent predator is just that  a term,” he said.

Goodwin also said that even though people committed to the Department of Mental Health have the possibility of being released, there is no requirement they be discharged at any point.

Judges questioned Mitchell on whether Nelson had exhibited behaviors that might one day allow him to be released from mental health facilities. Mitchell urged the justices not to “conflate Nelson”s conduct” with the wording of the statute.

This is not the first time Missouri”s sex offender rehabilitation program has faced legal action. A federal lawsuit originally filed in 2009 alleged that the program was “mismanaged, underfunded, understaffed and in violation of the United States and Missouri Constitutions.”

In that case, the court ruled in 2015 that the statute outlining the program itself wasn”t unconstitutional, but that the “systemic failures regarding risk assessment and release” resulted in prolonged confinement for people who no longer met the confinement criteria.

___

The version of the story corrects the sentence paraphrasing remarks by Nelson”s attorney, Chelsea Mitchell.