A mistake of law, also called “ignorance of the law,” is a defense to criminal prosecution offered by a defendant who admits to committing the act, but who argues that they did not know that the act was illegal.
Mistake of law is generally considered a dubious defense in most jurisdictions.
Courts make the basic presumption that everyone has a responsibility to know the law of the jurisdiction in which they are physically present. So, courts rarely allow defendants to offer mistake of law as a total defense to their actions.
In the rare cases where courts allow defendants to present a mistake of law defense, the defense is considered an affirmative defense that places the burden on the defendant to prove that a mistake of law actually and validly existed.