What Is a Mistake of Law and When Is It a Defense?

A mistake of law is a misunderstanding or ignorance of what the law requires, and it almost never works as a defense. Courts begin from the position that everyone is responsible for knowing the rules that apply to them, so arguing you didn’t realize your conduct was illegal will fail in the vast majority of cases. Narrow exceptions exist: certain crimes that require proof of willful intent, situations where you reasonably relied on an official source that turned out to be wrong, and rare constitutional fair-notice claims. In civil disputes, a shared misunderstanding of the law between contracting parties can sometimes justify canceling or rewriting the agreement.

Why the Default Rule Rejects the Defense

The system runs on the Latin maxim ignorantia juris non excusat: ignorance of the law is no excuse. The reason is practical. If people could escape liability by claiming they didn’t know a rule existed, every defendant would have an incentive to stay deliberately uninformed, and enforcement would collapse. So the law holds everyone to the same standard regardless of legal sophistication. The error being claimed is about a legal obligation, not about what actually happened, and that distinction does a lot of work in how courts respond.

How It Differs From a Mistake of Fact

A mistake of fact is a misunderstanding about the circumstances of a situation, and unlike a mistake of law, it frequently works as a defense. The reason is intuitive: if you genuinely didn’t know a relevant fact, you may not have had the mental state the offense requires. The Model Penal Code recognizes this, treating a mistake about a matter of fact or law as a defense when it negates the mental state required for the offense.1Legal Information Institute. Mistake of Fact

Picture someone at a baggage carousel who grabs a suitcase identical to their own, genuinely believing it’s theirs. That’s a mistake of fact. The error involves who owns the bag, not what the law says about taking someone else’s property, and because the person never intended to take what wasn’t theirs, they likely haven’t committed theft. Change the scenario: the person knows the suitcase isn’t theirs but takes it anyway, believing property left on a carousel is legally abandoned. That’s a mistake of law. The facts are understood; the legal rule is misread. Under the general rule, that misunderstanding won’t provide a defense.

Mistake-of-fact defenses succeed far more often because they directly undermine the prosecution’s ability to prove intent. With specific-intent crimes, even an unreasonable mistake of fact can sometimes work.1Legal Information Institute. Mistake of Fact A mistake of law faces a much steeper climb.

When Mistake of Law Works in a Criminal Case

The general rule has recognized exceptions, but each one is narrow and hard to prove.

Willfulness and Specific-Intent Crimes

Some statutes require the government to prove the defendant acted “willfully,” meaning they knew their conduct was illegal and did it anyway. Federal tax evasion is the classic example. The statute makes it a felony to willfully attempt to evade or defeat any tax.2Office of the Law Revision Counsel. 26 USC 7201 – Attempt to Evade or Defeat Tax That word does real work: the prosecution must show the defendant knew they owed a tax and deliberately tried to avoid paying it.

The Supreme Court drove this home in Cheek v. United States, holding that a good-faith belief the tax code didn’t require certain conduct negates willfulness, even if the belief is objectively unreasonable. The Court reasoned that the complexity of tax law justifies protecting people from prosecution for honest mistakes, so long as the jury believes the claimed misunderstanding was genuinely held.3Legal Information Institute. Cheek v United States Most successful mistake-of-law defenses live here, and even then juries are often skeptical. Claiming you sincerely believed wages aren’t taxable income is a tough sell.

Reliance on an Official Statement of the Law

A defendant can also raise the defense when they reasonably relied on an official statement of the law that later turned out to be wrong. The Model Penal Code recognizes this when the reliance was on a statute later declared invalid, a judicial decision later overruled, an administrative order or permission, or an official interpretation from the government body responsible for enforcing the law in question.4OpenCasebook. MPC and State Rules on Mistakes Many states have adopted some version of this framework.

The limits are strict. Relying on a friend’s interpretation doesn’t count. Neither does relying on a blog post or a news article. The source must be an authoritative body actually responsible for interpreting or enforcing the law, and your reliance must have been reasonable under the circumstances.

Unpublished or Unavailable Laws

If a statute defining an offense was never published or made reasonably available before the alleged violation, the defense may apply. The idea is basic fairness: you can’t be expected to follow a rule you had no realistic way of discovering. In practice this is rare, since most laws are publicly available, but it can surface with obscure local ordinances or administrative regulations that received limited distribution.

The Constitutional Fair-Notice Limit

The Constitution imposes its own limit on punishing people who had no way of knowing about a legal duty. In Lambert v. California (1957), the Supreme Court struck down a Los Angeles ordinance that required convicted felons to register with the police if they stayed in the city more than five days. The defendant had no idea the requirement existed, and the Court held that convicting her without any showing she knew or should have known about the duty violated the Due Process Clause of the Fourteenth Amendment.5Library of Congress. Lambert v California, 355 US 225 (1957)

The key was that the ordinance punished pure inaction rather than any affirmative conduct. When a law punishes a failure to act and nothing alerts the person to the obligation, due process requires proof that the defendant knew or probably knew about the duty. Courts have generally kept this exception narrow, limiting it to passive-conduct situations similar to Lambert.

Advice of Counsel

Relying on your lawyer’s advice can sometimes shield you from criminal liability, but only under strict conditions. The Ninth Circuit’s model instructions lay out the core framework: unlawful intent hasn’t been proven if you fully disclosed all relevant facts to an attorney, received specific advice that your planned course of action was legal, and followed that advice in good faith.6United States Courts for the Ninth Circuit. 5.10 Advice of Counsel – Model Jury Instructions

Each element matters. You can’t give your lawyer a sanitized version of the facts and then hide behind the advice. You must have specifically asked about the legality of the conduct and received affirmative advice that it was lawful. Vague reassurances or casual conversation won’t cut it. There’s also a procedural cost that catches defendants off guard: raising the defense typically requires waiving attorney-client privilege with the lawyer whose advice you’re relying on, which lets the prosecution examine the full scope of what you told your attorney and what they said back.

This defense applies primarily to specific-intent crimes where willfulness is an element. It doesn’t help with strict-liability offenses, and it won’t work if the advice was so clearly wrong that no reasonable person would have relied on it.

Who Has to Prove It

Mistake of law is an affirmative defense, which means the defendant bears the burden of establishing it rather than the prosecution bearing the burden of disproving it. In most criminal cases, the prosecution must prove every element beyond a reasonable doubt. Once the defendant raises an affirmative defense, that shifts. The defendant generally must prove it by a preponderance of the evidence, meaning more likely true than not. Some jurisdictions require clear and convincing evidence for certain affirmative defenses.

That translates to a documentation problem. For reliance on an official statement, you need to identify exactly which statute, regulation, or official interpretation you relied on. For advice of counsel, you need to show what you disclosed, what question you asked, and what specific guidance you received. Bare assertions of confusion rarely survive scrutiny.

Mistake of Law in Civil Contract Disputes

Mistake of law plays a different role in civil cases, particularly contract disputes. When both parties to a contract share the same wrong understanding of a legal principle fundamental to their deal, courts can step in to undo or reshape the agreement. This is called a mutual mistake.

For mutual mistake to justify rescission, both parties must have been independently mistaken about the same basic legal assumption, and the mistake must have been significant enough that the affected party wouldn’t have entered the agreement had they known the truth.7Legal Information Institute. Mistake The party seeking relief also must not bear the risk of the mistake. If you knew you had limited knowledge about a legal issue but decided to proceed anyway, a court is unlikely to rescue you afterward.

Suppose two parties agree to a land sale based on a shared misunderstanding of zoning law, believing the property can be developed commercially when it’s actually restricted to residential use. The mistake goes to the heart of the deal and likely changes the property’s value dramatically. A court could rescind the contract, returning both parties to where they started, or reform it to reflect what they actually intended.

A unilateral mistake, where only one party misunderstands the law, is harder to turn into a remedy. Under the framework reflected in the Restatement (Second) of Contracts, a unilateral mistake can make a contract voidable only if it meets the same requirements as a mutual mistake plus an additional showing: that enforcing the contract would be unconscionable, that the other party knew or should have known about the mistake, or that the other party caused it.7Legal Information Institute. Mistake Without one of those extra factors, the mistaken party is generally stuck with the deal they made.