The St. Paul man who was found incompetent to stand trial for allegedly kidnapping and sexually assaulting a 7-year-old girl this year is expected to be civilly committed to the state's sex offender treatment program.

August J. Ruthaferd, also known as Mark S. Meihofer, 48, has been taking medication and recently was found competent to understand the commitment process, said his attorney, Kathleen Rauenhorst, at a court hearing Wednesday. Rauenhorst said she has met with Ruthaferd several times and that he admitted that he needed hospitalization because he can't control his sexual impulses and is likely to reoffend.

Progress on the civil matter could have implications for Ruthaferd's criminal case, but a doctor would have to examine him and find him competent separately in the criminal proceeding. He was found incompetent in June to stand trial in the criminal case.

Ruthaferd was forcibly committed in September to the Minnesota Security Hospital in St. Peter, Minn., for being mentally ill. It's unclear if he will be committed in St. Peter or Moose Lake for sex offender treatment. He did not attend Wednesday's hearing.

Ruthaferd waived his right to a trial on the civil commitment, meaning he's agreed to commit himself as a sexually dangerous or sexually psychopathic person for an indeterminate amount of time. That element of his commitment had been scheduled for trial in civil court.

"While securing the civil commitment of a sexually dangerous individual is a great outcome for our community, it is only one step in an ongoing process that our office will closely monitor," Ramsey County Attorney John Choi said in a statement. "Should he be restored to competency to stand trial while committed, we will prosecute him … for his alleged crimes."

County attorney spokesman Dennis Gerhardstein said that Ruthaferd's criminal case will remain open and that Ruthaferd's mental competency to stand trial will be revisited every six months.

Ruthaferd was charged in Ramsey County District Court with kidnapping and first-degree sexual assault for abducting the girl on May 5. She went missing about 6:45 p.m. from the 300 block of Dayton Avenue.

She was found about two hours later in Ruthaferd's room at a Catholic Charities residence and reunited with her family after medical treatment.

The girl had been gagged and bound. She showed signs of sexual assault, and she told officers that Ruthaferd had taken naked pictures of her and forced her to smoke a substance that tasted like "fire." She tested positive for amphetamine at Children's Hospital.

Rauenhorst was appointed in August to represent Ruthaferd in the civil proceeding after the county attorney's office filed a petition to have him civilly committed for being mentally ill and sexually dangerous.

Ruthaferd at first refused to speak with Rauenhorst or doctors, but he was diagnosed with paranoid schizophrenia and chemical dependency based on his records.

The court granted the county attorney's mental illness commitment in mid-September. Later that month, the court ordered Ruthaferd to take five medications.

Rauenhorst said that she met with Ruthaferd after he began taking the medications. She visited him Monday and told the court Wednesday that Ruthaferd said his actions in the criminal case were "very serious" and that the public needed to be protected from him.

The girl's parents and several supporters attended the hearing and declined to comment afterward.

Twitter: @ChaoStrib