When a new law or regulation makes it unlawful to carry out what a contract requires, the doctrine of subsequent illegality in contract law discharges the affected obligations: both sides are released from the performance that has become illegal, and neither can be sued for failing to do what the law now forbids. What survives, what has to be refunded, and whether the whole deal collapses or just a slice of it depends on timing, on what has already been performed, and on what the contract itself says about regulatory risk.
The Core Rule
If a government regulation or order makes performance of a contractual duty impracticable, that regulation is treated as an event the parties did not anticipate when they signed, and the duty is discharged.1OpenCasebook. Restatement (Second) of Contracts 264 The discharge reaches only forward in time. Anything fully performed and paid for before the law changed stays as it was.
A point that trips people up: the fact that you could technically still perform by breaking the new law and taking the penalty does not block you from claiming discharge.1OpenCasebook. Restatement (Second) of Contracts 264 The law does not demand that you become a lawbreaker to honor a private agreement.
One boundary worth drawing at the start. This doctrine applies only to contracts that were lawful when signed and became unlawful afterward. A contract formed for a purpose that was already illegal has no legal force from the beginning, and courts generally refuse to help either side recover anything under it. The remedies described below — restitution, partial enforcement, refunds of deposits — are available because the contract was valid when made.
What Happens to Money and Work Already Exchanged
The messiest question when a contract is cut short by a legal change is what to do about money paid or work done before the change took effect. The general principle is restitution: courts try to put the parties back where they stood before the unfulfilled portion became illegal.
If you paid a deposit for a service the law now prohibits, you are typically entitled to a refund. The other side cannot keep your money for something it can no longer legally deliver. If a portion of the deal was fully performed and accepted before the change, that completed exchange usually stands. Courts do not unwind transactions that were legal and complete when they occurred.
Partial performance is where things get complicated. If a contractor finished 60% of a project before a new building code made the rest illegal, the contractor can generally recover the reasonable value of the work already done. Neither party planned for a legal barrier, and forcing one side to absorb the whole loss would be inequitable.
Temporary Bans vs. Permanent Prohibitions
Not every legal prohibition kills a contract outright. When the change in law is temporary, the contract is typically suspended rather than permanently discharged. Obligations pause while the prohibition is in effect, and the parties pick up where they left off once the restriction lifts. Many COVID-era shutdown orders worked this way: clearly time-limited, and treated as suspensions rather than terminations.
Permanent discharge kicks in only if resuming performance after the prohibition ends would be materially more burdensome than the original deal contemplated. A three-month ban on an activity may justify full discharge of a contract with a tight deadline, because the delay itself destroys the deal even though the ban eventually lifts. The question is whether the contract still makes sense for both sides once the obstacle is gone.
When the Discharge Rule Does Not Apply
Subsequent illegality is not an automatic escape hatch. Several situations prevent a party from claiming discharge even when a new law appears to block performance.
- Assumed risk. If the contract language or the surrounding circumstances show that one party took on the risk of government action, that party cannot later claim surprise. Contracts that require a government permit are a common example. Courts often read those agreements as a promise to pay damages if the permit is denied, not a promise to perform in violation of the law.1OpenCasebook. Restatement (Second) of Contracts 264
- Pre-existing prohibition. If the legal barrier already existed when the contract was signed, the subsequent illegality doctrine does not apply. A different legal framework governs contracts made in the face of existing restrictions.
- Contract language to the contrary. Parties can write their agreement to override the default rule. If the contract says one side bears the risk of a regulatory change, courts will honor that allocation.
The assumed-risk scenario catches contractors and suppliers more often than they expect. In an industry where regulatory shifts are foreseeable, a court may find that the possibility of a new restriction was baked into the deal from the beginning.
Contracts for the Sale of Goods
If the contract is for the sale of goods, a separate body of law applies. Under the Uniform Commercial Code, a seller is not in breach for failing to deliver if performance has been made impracticable by compliance with a governmental regulation or order.2Legal Information Institute. UCC 2-615 Excuse by Failure of Presupposed Conditions The protection applies even if the regulation later turns out to be invalid, so the seller does not have to gamble on whether a legal challenge might succeed.
The UCC adds two obligations that general contract law does not always impose. First, if the new regulation affects only part of the seller’s capacity, the seller must allocate what remains fairly among customers rather than favoring some over others. Second, the seller must notify the buyer promptly of any expected delay or inability to deliver, including the estimated quantity still available.2Legal Information Institute. UCC 2-615 Excuse by Failure of Presupposed Conditions Failing to give timely notice can undermine the excuse even when the underlying illegality is real. Many sellers make exactly this mistake: the legal change protects them, but only if they communicate it properly.
How Contract Clauses Change the Outcome
Two provisions in the contract itself can dramatically reshape what happens when a law changes: a severability clause and a force majeure clause.
Severability Clauses and Partial Illegality
When only part of a contract becomes illegal, a severability clause can prevent the whole agreement from collapsing. It tells a court that if any single provision is found unenforceable, the rest of the contract survives intact.
Picture a construction contract that specifies a particular waste disposal method alongside the core obligation to build a structure. If a new environmental regulation bans that disposal method, a severability clause lets a court remove the illegal provision while keeping the construction obligations in place. Without the clause, there is a real risk that a court would void the entire agreement rather than carve it apart.
A well-drafted severability clause makes it far more likely that a partial change in law will trim your contract rather than destroy it. In a long-term agreement in any regulated industry, that clause is not boilerplate to skim past.
Force Majeure Clauses
Force majeure clauses address a broader category of disruption than subsequent illegality alone. They anticipate events beyond the parties’ control, whether factual (a natural disaster shutting a factory) or legal (new restrictions that prohibit performance). When a force majeure clause specifically covers changes in law or government orders, it typically controls instead of the default common-law discharge rules.
The main advantage is that the parties define the consequences in advance. Most force majeure clauses suspend performance for a defined period rather than terminating the contract automatically. Some include a long-stop date after which either side can walk away. Others leave the suspension open-ended, which creates its own problems when neither party knows when or whether performance will resume.
One nuance to keep in mind: including a specific risk in a force majeure clause does not always prevent a court from also applying the common-law doctrine of discharge. If the clause does not make full and complete provision for what actually happened, courts may still step in with the default rules. A force majeure clause that mentions “government regulation” in a laundry list but says nothing about the consequences gives less protection than you might assume.
What to Do When a Law Change Hits Your Contract
If a new law or regulation affects a contract you are party to, speed matters. The UCC explicitly requires sellers to notify buyers promptly, and even outside the UCC, delayed communication can weaken your legal position or expose you to claims that you breached before the illegality was established.
- Read the contract first. Check for force majeure clauses, severability clauses, and any language allocating regulatory risk. These provisions may override the default rules and dictate what happens next.
- Notify the other party in writing. Identify the specific law or regulation, explain how it affects performance, and state whether you consider the contract discharged, suspended, or only partially affected. Written notice creates a record that protects you if a dispute follows.
- Preserve records of performance to date. If you have partially performed or made payments, document everything. Restitution claims depend on showing what was delivered, what was paid, and when the legal change took effect.
- Assess whether the prohibition is temporary. A short-term ban may only suspend your obligations rather than end them. Treating the contract as dead when it is only paused can itself be a breach.
The worst outcome in these situations is rarely the legal change itself. It is the failure to respond to it correctly. Parties who sit on their hands, continue performing illegally, or declare the contract dead without proper analysis tend to end up worse off than those who address the problem directly and in writing.