A woman who was accused of threatening a man with a machete and forcing him to have sex had a sentencing hearing Tuesday in district court.

Samantha Ray Mears, who was 19 when the incident occurred last year, appeared before Cascade County District Judge Greg Pinski via video from the Montana State Hospital in Warm Springs.

Pinski committed Mears to the Montana Department of Public Health and Human Services for placement in a mental health facility for a period of 20 years, calling it "the maximum penalty that can be imposed in this matter."

Mears was charged in June 2018 with aggravated burglary, assault with a weapon, unlawful restraint, partner family member assault and two counts of criminal mischief just two months after a felony strangulation charge against the same victim.

According to court documents, Mears hid behind the bedroom door in her ex-boyfriend's house, forced him at machete-point to have sex, bit him on the arm, tore a large chunk of trim off the wall and urinated on his bed.

She has been held at the Montana State Hospital since just after her second arrest.

Mears was found not guilty but mentally ill, meaning that if she had gone to trial, she was likely to be found not guilty by reason of mental disease or defect.

Mark Frisbie, Mears' defense attorney, detailed his client's mental health issues as well as learning disabilities that have contributed to these incidents.

Pinski expressed concern that although Mears is stable now, her inability to stay on her medication while out in the community means she would be at "substantial risk" to commit more crimes.

Frisbie agreed that Mears posed a level of danger to the community but argued she needed treatment and supervision if she is to ever be successful and that such treatment could be difficult given her learning disabilities.

Mears was ordered to undergo some form of sex offender programming during her commitment and will be designated a tier 2 sex offender.

Criminal justice reporter Traci Rosenbaum reports on law enforcement issues for the Tribune. Have ideas or questions for Traci on her beat? Reach her at trosenbaum@greatfallstribune.com or 406-791-1490. Follow her on Twitter @GFTrib_TRosenba.

Support Traci's journalism:Subscribe today and get a special offer

Have a news tip for us? Click here.