Deific-decree

The deific decree delusion is a defense in a criminal case in which a person committed a crime in the belief that their God ordered them to do it. This would make the perpetrator legally insane as they would be incapable of distinguishing right from wrong.