Insanity Defense

In criminal cases the defense made during the trial that the accuse was not aware that he/she was commiting a crime as he/she was of unsound mind and because of this defect he was not able to judge that the act was illegal.The act was perfromed because of a mental defect and was not commited intentionally.