The Iowa Supreme Court on Friday tossed out a murder conviction and ordered a new trial for a man accused of the gruesome 2017 stabbing death of his girlfriend.

In a split decision, the state's high court ordered a new trial for Gregory Michael Davis, 30, after finding his trial attorney's failure to object to confusing jury instructions cost Davis a fair trial.

Davis was convicted in 2018 of first-degree murder and other counts in the September 2017 death of 29-year-old Carrie Davis, whose body was found rolled in a blanket inside a trailer in Marion. Investigators determined she had been stabbed 26 times days before her body was found.

Gregory Davis never denied killing her but argued an insanity defense. His lawyers said he had a long history of mental illness and drug abuse and that he believed at the time of the stabbing that killing his girlfriend would free her from evil forces.

On appeal, Gregory Davis' attorneys argued that his trial lawyer failed to object when the court adopted a set of jury instructions. In the instructions, the jurors were given the option of finding him not guilty by reason of insanity on each count except for the first-degree murder charge.

The high court found the omission "materially misleading," considering the cross-reference was included in all nine of the other lesser offenses.

"The instructional error allowed the jury to conclude the insanity defense didn't apply to first-degree murder," Justice Thomas D. Waterman wrote for the court. "This error undermines our confidence in the verdict."

In a dissent, Justices Christopher McDonald, Edward Mansfield and Dana Oxley questioned the majority's finding that jurors would have been confused by the instructions, given that Davis' insanity defense was "squarely and unequivocally" presented to the jury during trial.

"This is contrary to the relevant law, the record, and common sense," McDonald wrote.

The Iowa Attorney General's Office said in a written statement that it agreed with the dissenting justices, but "we accept that the majority disagrees."

Davis' appeal attorney, Alfredo Parrish, called the court case a "long, hard battle," and said he and his client looked forward to a new trial.