The defence of insanity is a general defence which is available to all crimes. Where a defendant is found to be insane, the jury are directed to give a special verdict of 'not guilty by reason of insanity' under s.2 of the Trial of Lunatics Act 1883. This previously meant automatic admittance to secure accommodation. Release was only possible on authority of the Home Secretary. This often resulted in lifetime institutionalisation. Mandatory detention still applies where the penalty for the offence is fixed by law eg murder. In all other cases detention is at the discretion of the judge under s.5 Criminal Procedure (Insanity) Act 1964.
The defence of insanity is unique in that it may be raised by the prosecution and judge in addition to the defence. Indeed, it is generally the defence seeking to avoid a finding of insanity and often the defendant will change a plea to guilty to avoid a finding of insanity. The defence has declined in importance and use since the abolition of the death penalty and the introduction of the defence of diminished responsibility in relation to murder.