(CNN) -- A Utah judge has ordered a registered sex offender who faces nearly two dozen charges of child sex abuse released on the basis that he is mentally incompetent to stand trial.
At a hearing on Thursday, Fourth District Judge James Taylor, who previously ruled Lonnie Johnson incompetent to be tried on sex crime charges, said there were no legal grounds for holding him.
"We are at the end of the road...I can't do anything but have him released from the state hospital," Taylor said at Thursday's hearing.
Taylor said he was following a Utah statute requiring the release of anyone deemed incompetent to stand trial and who has not been convicted of a crime.
Johnson, 38, has been diagnosed with a cognitive disorder. Doctors who examined Johnson found his competency could not be restored. They also said he is not a danger to society and did not qualify for involuntary institutional commitment.
Johnson faces five counts of rape of a child, six counts of sodomy on a child and 10 counts of aggravated sexual abuse of a child, according to court documents.
In 2006, he was convicted of raping a teenage girl in Washington State, sent to prison for third-degree rape and served less than a year, according to court documents. He is required to register as a sex offender wherever he lives.
"I am outraged that a convicted child sex offender, currently facing another round of accusations, could be released without being tried for current charges," Utah Gov. Gary R. Herbert said.
"It's outrageous for both the victims and the accused that Mr. Johnson won't get his day in court," he said.
In November, a status hearing will be held under the judge's orders, and he will appoint two new doctors to evaluate Johnson.
Prosecutors have also filed a new motion asking the judge to reopen competency hearings in the criminal case.
"What I wanted to do was jump over and take care of it myself,'' said Christy Danner, whose daughter is an alleged victim of Johnson.
''But that's not what we can do and that's not the way our system works, and we're going to have to fix this system and then hopefully get him back in the state of Utah and find him competent,'' Danner said on HLN's "Nancy Grace."
Danner cited Johnson's previous ability to hold down jobs and earn a living, and said she thinks Johnson is faking incompetence.
Johnson allegedly abused Danner's daughter, who was his niece by marriage, for six years, starting at age eight in 1997. She is now 21.
Johnson's family has maintained his innocence, alleging the accusations are related to a bitter divorce case.
"We kind of knew going in today that he was going to be released so we were able to at least anticipate that," Danner said.
"But, yeah, we're not happy and the girls are feeling victimized again and our only thing is that we have to close this loophole."
Watch Nancy Grace Monday through Sunday starting at 8 p.m. ET on HLN. For the latest from Nancy Grace click here.