(a) In a prosecution for a crime when the affirmative defense of insanity is not raised and when evidence of mental disease or defect of the defendant is not admitted at , the defendant or the prosecuting attorney may raise the issue of whether the defendant is guilty but mentally ill. A party that seeks a post-conviction determination of guilty but mentally ill must give notice 10 days before trial of intent to do so; however, this deadline is waived if the opposing party presents evidence or argument at trial tending to show that the defendant may be guilty but mentally ill. A hearing must be held on this issue before the same fact finder that returned the .

(d) In this section, “guilty but mentally ill” has the meaning given in AS 12.47.030 .