TALLAHASSEE (CBSMiami/NSF) – A federal appeals court has ruled that a Florida law dealing with the involuntary commitment of people with intellectual disabilities violates constitutional due-process rights.

The ruling by the 11th U.S. Circuit Court of Appeals stems from a man identified only by the initials J.R. who has an IQ of 56 and functions as a 7-year-old. In 2000, he was charged with sexual battery in Lee County but was later found incompetent to stand trial and was involuntarily sent to a non-secure residential facility.

READ MORE: Fort Lauderdale-Hollywood International Airport Job Fair On Wednesday

Attorneys for J.R. filed a lawsuit against the state Agency for Persons with Disabilities in 2011 because they said Florida law allows indefinite involuntary commitment without periodic reviews by judges. The ruling said a circuit judge has not held a hearing on J.R.’s commitment since 2005.

READ MORE: DEA Issues Public Safety Alert On Sharp Increase in Fake Prescription Pills Laced With Fentanyl and Meth

A federal district judge upheld the constitutionality of the state law, but the appeals court disagreed.

“A state must release a person who is involuntarily committed if the grounds for his commitment cease to exist. But that requirement — release the committed when they deserve to be let out — is toothless if a state does not periodically review whether the grounds for commitment are met,” Thursday’s ruling said. “That is, a state could get around the timely-release requirement by simply refusing to ever consider the continued propriety of commitment. To effectuate that requirement, then, the state must undertake some form of periodic review.”

MORE NEWS: Florida's Minimum Wage Workers Get Pay Boost This Week

The News Service of Florida contributed to this report.