The Oregon Court of Appeals on Wednesday overturned the conviction of a former Washington County Jail worker who admitted to repeatedly having sex in 2014 with an inmate, ruling she should have been allowed to present an insanity defense.

The ruling sends Brett Robinson's case back to Washington County Circuit Court for prosecution. She pleaded guilty to first-degree official misconduct and first-degree custodial sexual misconduct and was sentenced in June 2015 to three years in prison.

Robinson, 35, worked as a jail services technician in the maximum-security unit for about a year and a half until resigning while facing charges for having sex with a now-28-year-old male inmate. Another civilian worker at the jail, 41-year-old Jill Curry, was sentenced to four years and two months in prison on March 2015 for separately having sex with the same inmate.

The sexual contact involving the two jail workers occurred a total of 19 times in 2014, prosecutors said, including six times by Robinson.

According to prosecutors, Curry repeatedly let the inmate out of his cell, allowed him to pass through three locked doors, including a control room, and met him in a closet. Robinson let the inmate into the control room with her.

Defense lawyer Paul Hood and Jeff Lesowski, a Washington County senior deputy district attorney who prosecuted the case, didn't immediately respond to requests for comment.

During Robinson's sentencing hearing, Lesowski said suggestions that Robinson's history of depression and anxiety reached the level of legal insanity "borders on the absurd." He attributed her actions to selfish behavior that was "treasonish in some ways."

Hood said during the same hearing that Robinson was prescribed several psychiatric medications beginning during her childhood, attempted suicide twice in her teens and later began using heroin. He described Robinson as ill-equipped to manage the jail's most dangerous inmates.

According to the Appeals Court ruling, Robinson gave written notice that she intended to present an insanity defense 18 days before her trial. The prosecution argued that the defense hadn't given enough notice or a good reason why the defense waited so long to make the notice.

Washington County Circuit Judge Rick Knapp ruled in favor of the prosecution, saying the law requires a defendant to file such notice as soon as possible barring a good reason. The judge said Robinson should have given notice of an insanity defense when she initially pleaded not guilty and that the timing of Robinson's notice was insufficient. He denied a request to delay the trial, and Robinson later pleaded guilty.

The defense argued that it was waiting for results of a psychological evaluation before moving forward with official notice of an insanity defense. The defense attorney gave notice a day after receiving the report, the ruling said. Hood sought to use an opinion of a psychologist who determined Robinson lacked the mental capacity to follow the law because of depression and anxiety.

Robinson appealed her conviction, saying Knapp's ruling was based on an erroneous interpretation of the law.

The prosecution and defense agree that Robinson wasn't in a position to file notice of an insanity defense at the time of her not guilty plea in August 2014, the Appeals Court ruling said.

The law requires defendants to have a valid reason -- or show cause -- why they didn't file notice at the time of the plea.

"Once a defendant does so, the statute, as worded, unequivocally authorizes the defendant to file the notice 'at any time' before trial," the ruling said. "Those words signal, rather plainly, that the Legislature intended that any defendant who shows just cause for not filing notice at the time of plea would be able to file notice at any later time, up to the start of trial."

The ruling also said that if the defendant's timing of notice doesn't give the prosecution enough time to prepare for trial, "then the proper course is to continue the trial to permit the state more time to prepare, not to preclude the defendant from presenting the defense."

-- Everton Bailey Jr.

ebailey@oregonian.com

503-221-8343; @EvertonBailey