The insanity defense is a legal argument used by defendants who claim that they were not responsible for their criminal actions due to a severe mental illness, which impaired their ability to understand the nature or wrongfulness of their actions. This defense requires a thorough psychiatric evaluation and often hinges on the jurisdiction's specific legal standards for determining insanity, such as the M'Naghten Rule or the Model Penal Code test.