In 1843, Daniel McNaughton opened probably the biggest can of worms that exists in law when he shot and killed Edward Drummond, Private Secretary to the then British Prime Minister Sir Robert Peel. The murder was a mistake; McNaughton meant to kill Peel. His defence was based largely around the fact that for years he had suffered from paranoid delusions, namely that Peel's Conservative Party was trying to kill him. McNaughton was found not guilty by reason of insanity, and was committed to Bethlem Hospital, and thence to Broadmoor Criminal Asylum shortly after it opened. The case gave cause to great debate in the House of Lords, resulting in the McNaughton Rules, which, although having no statutory basis, were afforded the same status as actual law.
In summary, these rules state that a person cannot be held responsible for a crime if they were 'labouring under such a deficit of reason from disease of the mind to not know the nature and quality of the act; or that if he did know it, that he did not know that what he was doing was wrong.