Short answer. No. The Civil Code says the defense of illegality of contract is not available to third persons whose interests are not directly affected. A stranger to the contract who has no interest of his own at stake cannot invoke its illegality to defeat a claim against him.

What the law says

The defense of illegality of contract is not available to third persons whose interests are not directly affected.

Civil Code, Article 1421 — Illegality and Third Persons. Read the full provision →

The defense belongs to those with a stake

Article 1421 draws a line around who may complain that a contract is illegal. It provides that the defense of illegality of contract is not available to third persons whose interests are not directly affected. Illegality is a powerful objection — it can render an agreement void — but the Code does not hand that weapon to just anyone. A person who is a stranger to the contract, and whose own rights are not touched by it, cannot step in and raise its illegality to escape some obligation of his own. The objection is reserved for those with a genuine, direct interest in the contract's validity.

Who counts as 'directly affected'

The pivotal words are directly affected. It is not enough that a person is somehow inconvenienced by the existence of a contract, or dislikes its consequences at a distance. His interest must be one that the contract itself operates upon — for instance, where the outcome of the agreement determines his own right or liability. A remote, indirect, or merely incidental connection does not qualify. The article filters out the busybody and the opportunist who, sued on a separate ground, tries to point at some other contract's illegality as a shield, even though that contract's validity has nothing to do with his own position.

Why the law limits the objection

The restriction keeps litigation honest. If any stranger could invoke the illegality of a contract, defendants would routinely rummage through unrelated agreements hoping to find a flaw that lets them off the hook, and the parties who actually made the contract would find its status decided in a case they are not even part of. By confining the defense to those directly affected, the law ensures that the legality of an agreement is contested by people who have a real reason to contest it, and not used as a convenient technicality by someone the contract never bound in the first place.

How this plays out for you

If someone who is a stranger to your contract is trying to defeat your claim by calling that contract illegal, the first question is whether his own interests are directly affected by it. If they are not, Article 1421 stands in his way. Conversely, if you are the one wishing to raise a contract's illegality, be ready to show that your own rights are directly at stake, not merely brushed in passing. Because the closeness of the interest is a judgment on the specific facts, the relationships and the exact claims involved should be examined carefully.

Cases citing this provision

These Supreme Court decisions cite the provision above. We list them so you can read them yourself; the summaries of what each decided are not ours to give.

Related provisions

Note. Statute text quoted on this page is reproduced from the official enactment and is linked to the full provision. The explanation around it is general legal information from Vivas & Nobles Law Office, not legal advice. Whether it applies to your situation depends on facts only a lawyer reviewing them can assess.