BAKERSFIELD, Calif. (KGET) — A man found incompetent to stand trial on allegations he broke into a home and attempted to rape an elderly woman will be sent to a state mental hospital for treatment.

A judge on Tuesday ordered Fermin Maciel, 31, committed for up to two years, according to the District Attorney’s Office. Efforts will be made to restore him to competency.

The criminal case against him has been suspended. He had faced charges of attempted rape, assault with the intent to commit rape, burglary and injuring an elderly person.

Police arrested Maciel in connection with two incidents that occurred at the same home in July. He knows the alleged victim’s son.