TRENTON, N.J. — New Jersey’s highest court has ruled that people found mentally competent to stand trial can’t be forced to plead insanity against their will.

The unanimous state Supreme Court ruling issued Wednesday overturned the 2009 acquittal of June Gorthy, who was accused of stalking a therapist. The judge imposed the plea against the wishes of Gorthy, who didn’t believe she was insane and wanted to avoid being committed to a mental hospital.

A judge must now re-evaluate whether the 55-year-old Gorthy is competent to stand trial and, if she is, retry her on a stalking charge, according to the ruling. The court upheld her conviction on weapons offenses in the case.

“Although the defendant’s decision not to assert the insanity defense may have been imprudent, it was nonetheless an informed exercise of her free will,” the ruling said.

Gorthy was accused of stalking a psychotherapist who lived in Manasquan.

The Colorado woman became obsessed with the therapist after they met at a conference, according to court records. The therapist testified at Gorthy’s trial that she wanted nothing to do with Gorthy, but the woman continued to call her and send her gifts and cards.

Gorthy then drove across the country to be with her despite rejections from the therapist, and showed up outside the therapist’s office one day with a buck knife strapped to her waste, according to prosecutors.