Contracts · Defenses to Enforceability

Illegality: Courts Won't Referee Lawbreaking Deals

Migrated from EliExplainsLaw.org. General legal education only; not legal advice. Jurisdiction, historical dates, citations and source caveats are preserved below. This migration is not a current substantive legal accuracy review.
On this page 4 sections
  1. In 30 seconds
  2. The college version
  3. Quick check
  4. Study tools

In 30 seconds

Courts walk away from deals that break the law, leaving both sides right where they stand.

The college version

⚡ 10-Second Rule

Courts walk away from deals that break the law, leaving both sides right where they stand.

🧒 ELI-10 Scene

Two kids sneak into the community pool after closing and bet five dollars on a race. The loser refuses to pay, and both run to the lifeguard, Coach Dana, to settle it. Coach Dana crosses her arms. "You weren't supposed to be in the pool at all. I'm not scoring a race that broke the rules." She doesn't make the loser pay. She doesn't refund anything either. She just walks away, leaving both rule-breakers exactly where they stand.

⚖️ Actual Rule

A contract whose subject matter or performance is itself illegal — a deal to commit a crime or tort — is void and unenforceable by either party. Distinguish the contract that is legal on its face but tainted by one party's illegal purpose: there, the party who neither knew of nor furthered the illegal purpose may enforce the contract, while a party who knew of a seriously wrongful purpose or acted to further it cannot. Under the in pari delicto doctrine, when both parties are equally at fault, courts leave them where they find them — no enforcement and, generally, no restitution — with exceptions for a party who is not equally culpable, who withdraws before the illegal purpose is carried out, or who belongs to the class the violated statute protects. Licensing statutes are the classic testing ground: if the license requirement is regulatory — designed to protect the public, as with exams and character checks for electricians, physicians, or lawyers — an unlicensed provider cannot enforce the contract or recover its price; if the requirement merely raises revenue — a fee with no competence screening — the contract remains enforceable. Where an agreement contains both legal and illegal portions and the consideration is divisible, courts sever and enforce the legal portion. Finally, a contract legal in every technical sense may still be unenforceable as against public policy: the Restatement (Second) of Contracts § 178 (paraphrased) directs courts to weigh the interest in enforcement against the public policy harmed. Covenants not to compete are the prime example — enforceable only if reasonable in duration, geographic reach, and scope, and no broader than needed to protect a legitimate interest such as trade secrets or customer goodwill; many courts narrow an overbroad covenant rather than void it entirely.

ELI-10 translation: courts won't help enforce lawbreaking, won't refund the guilty, and trim promises that hurt everyone else.

🔍 Ask These Questions

  1. Is the performance itself illegal — a promised crime or tort? (Does doing the deal mean breaking the law?)
  2. Is the deal legal on its face but soaked in one party's illegal purpose? (Is the thing fine, but one side's plan for it rotten?)
  3. Are the parties equally guilty, so the court leaves everyone put? (When both hands are dirty, nobody gets the referee.)
  4. If a license was missing, was it regulatory or just revenue-raising? (A safety license blocks payment; a mere tax sticker does not.)
  5. Can the court sever the legal part from the illegal part? (Can the good half of the deal be snipped free and kept?)
  6. Even if technically legal, does the deal offend public policy — like an overbroad noncompete? (Does the promise hurt everybody else more than it helps these two?)

⚠️ Bar Trap

Exam language: Examiners give you a competent, fully performed job by an unlicensed provider and a customer refusing payment, inviting recovery on the contract or in quantum meruit. The outcome turns on the statute's purpose: a regulatory licensing scheme protecting the public bars the unlicensed party's recovery, while a revenue-raising license leaves the contract enforceable — quality of the work is irrelevant.

ELI-10: Ask why the license exists. If it exists to keep people safe, the unlicensed worker gets nothing, even for perfect work. If it exists only to collect money for the city, the worker still gets paid.

🧪 Question

A state statute requires anyone performing electrical work to pass a rigorous safety examination, undergo a background check, and obtain an electrician's license, with criminal penalties for unlicensed work; the legislature enacted the scheme after a series of fatal wiring fires. An electrician whose license had lapsed contracted to rewire a bakery for $6,000. He completed the work, which a licensed inspector later described as flawless. The bakery owner, learning of the lapsed license, refused to pay, and the electrician sued for the contract price or, alternatively, the reasonable value of his services.

Can the electrician recover?

(A) Yes, as to the contract price, because the work was performed competently and the owner received exactly what was bargained for. (B) Yes, as to reasonable value, because denying all recovery would unjustly enrich the bakery owner. (C) No, because the licensing statute is regulatory, enacted to protect the public, and courts will not aid an unlicensed provider in recovering for services the statute forbids. (D) No, because every contract made by a person lacking any required license is void.

Answer: (C). The exam, background check, criminal penalties, and safety rationale mark this as a regulatory licensing statute, not a revenue measure. Courts deny an unlicensed provider both contract and quasi-contract recovery, because allowing payment would gut the statute's protective purpose — however good the work.

💡 Why the Wrong Answers Are Wrong

  • (A) makes quality dispositive; competence cannot cure a bargain the regulatory statute renders unenforceable by the violator.
  • (B) deploys unjust enrichment, but restitution is generally denied where it would defeat a public-protection statute's purpose.
  • (D) sweeps too broadly: contracts made without a purely revenue-raising license remain enforceable.
  • ELI-10: The misconception is thinking good work always earns pay. When the missing license was a safety shield for the public, the court keeps its hands off completely.

Quick check

1 question here. Answers stay hidden until you check.

Question 1 of 1

A state statute requires anyone performing electrical work to pass a rigorous safety examination, undergo a background check, and obtain an electrician's license, with criminal penalties for unlicensed work; the legislature enacted the scheme after a series of fatal wiring fires. An electrician whose license had lapsed contracted to rewire a bakery for $6,000. He completed the work, which a licensed inspector later described as flawless. The bakery owner, learning of the lapsed license, refused to pay, and the electrician sued for the contract price or, alternatively, the reasonable value of his services. Can the electrician recover?

Choose an answer, then check it.

Keep learning

Ready to build on this? Continue to the next lesson.

Practice this lesson
Study tools & related lessonsRelated

Educational content only. It is not medical, legal or professional advice. Found an error? Tell us.