not guilty by reason of insanity

Definition from Nolo’s Plain-English Law Dictionary

A plea entered by a defendant in a criminal trial, in which the defendant claims that he or she was so mentally disturbed or incapacitated at the time of the offense that he could not have intended to commit the crime. A jury that agrees with this plea may find the defendant not guilty by reason of insanity, but usually the defendant faces civil commitment proceedings if the defendant is judged to be dangerous in a subsequent hearing. (See also: insanity defense)

Definition provided by Nolo’s Plain-English Law Dictionary.