 Where the defendant is alleged to have been insane at the time of committing the offence , this issue can be raised in one of three ways ; the defendant can claim he was insane , the defendant can raise a defence of Automatism where the judge decides it was instead insanity , or the defendant can raise a plea of diminished responsibility , where the judge or prosecution again show that insanity is more appropriate . Whatever the way in which a plea of insanity is reached , the same test is used each time , as laid out in the M 'Naghten Rules ; " to establish a defence on the ground of insanity , it must be clearly proved that , at the time of the committing of the act , the party accused was labouring under such a defect of reason , from disease of the mind , as not to know the nature and quality of the act he was doing ; or , if he did know it , that he did not know what he was doing was wrong " . 
