Civil law & contracts

Nullity and Voidability of a Contract in Spain: Key Differences

By the AbogadoAI editorial team · Updated 18 July 2026 · 12 min read

🇪🇸 Read the original in Spanish

When we sign a contract in Spain, whether to rent a property, buy a vehicle, or contract a service, we tend to think that the document is definitive and unalterable. However, the Spanish legal system provides mechanisms to invalidate agreements that are born with serious defects. In the field of Civil Law, it is essential to distinguish between two concepts that are often confused, but whose consequences and deadlines are radically opposite: absolute nullity (or void ab initio) and voidability (or relative nullity). Understanding these differences is not just a theoretical matter, but an essential asset protection tool for any foreigner or expat operating in the Spanish market.

What is the Nullity of a Contract? (Absolute Nullity)

Absolute nullity or nullity by operation of law (nulidad absoluta or de pleno derecho) occurs when a contract is born "dead". It is the most severe sanction that the Código Civil (Civil Code) imposes on legal transactions that violate the limits of the autonomy of will or that lack the essential elements for their existence.

A null contract produces no legal effect from the very beginning (ab initio). It is as if it had never existed, and the legal action to declare this nullity does not prescribe over time.

Causes of Absolute Nullity According to the Civil Code

The reference regulatory framework is found in the Spanish Código Civil. A contract is null and void by operation of law when any of the following circumstances occur:

What is the Voidability of a Contract? (Relative Nullity)

Voidability (anulabilidad), on the other hand, refers to a contract that is born "sick", but alive. The contract produces all its effects from the moment of its signing, but it carries a defect or vice that allows the affected party to request its invalidation before the courts.

If the authorized party does not exercise the action of voidability within the legal deadline, the contract is validated (it is "cured") and its effects become definitive.

A contract is voidable when, even though it has consent, an object, and a cause, it presents any of the following defects regulated from Article 1300 of the Código Civil onwards:

Main Differences Between Nullity and Voidability

To facilitate the understanding of both concepts, we analyze their structural differences in the following table and breakdown:

| Characteristics | Absolute Nullity (Nulidad Absoluta) | Voidability (Anulabilidad) | | :--- | :--- | :--- | | Initial effectiveness | Produces no effects (ab initio). | Produces effects until declared invalid. | | Deadline to claim | Imprescriptible (no time limit). | 4 years (statute of limitations / plazo de caducidad). | | Who can request it | Any person with a legitimate interest, or de oficio (on the court's own motion) by the judge. | Only the injured party or the party protected by law. | | Confirmation or remedy | Cannot be remedied or confirmed. | Confirmable (the contract can be validated). |

The Passage of Time and Validation

The most critical difference in daily practice is the time factor. If you buy a commercial premises through a contract that is null and void by operation of law (for example, because the object of the contract is illegal), you can sue for the nullity of the contract in 10, 20, or 30 years, as the action does not prescribe.

However, if you bought that same premises under the influence of serious deceit (dolo) by the seller, you only have a period of 4 years to file the lawsuit for voidability. If you let this period pass, the contract will be fully confirmed and you will lose the right to recover your money.

Practical Examples with Real Figures

To illustrate how these concepts operate in the Spanish economic reality, we analyze two common scenarios:

Example 1: Absolute Nullity Due to Lack of a Real Object

Let's imagine that Juan, a foreign resident on the Costa del Sol, signs a purchase agreement and pays a deposit of €45,000 to a developer for an off-plan apartment in a building that, as is later discovered, completely lacks planning permissions and has been built on specially protected non-developable land (suelo protegido no urbanizable).

Since the object of the contract is legally impossible and illicit (violating mandatory land planning regulations), the contract is null and void by operation of law. Juan can file a judicial lawsuit for nullity at any time. The court will declare the absolute nullity of the contract, forcing the developer to return the full €45,000, plus the legal interest accrued since the date of payment.

María rents a commercial premises in Madrid to open a café. The owner assures her in writing that the premises has the regulatory smoke extraction outlet (salida de humos) and charges her a fianza (security deposit) of €3,000 plus a monthly rent of €1,500. After signing the lease contract and paying an initial total of €4,500, María applies for the business license and the Town Hall denies it because the building does not have, and cannot have due to community regulations, a smoke outlet.

Here, there is a vice of consent due to dolo (active deceit by the landlord). The contract is not null and void by operation of law, but rather voidable. María has a period of 4 years (which starts counting from the consummation of the contract, i.e., from when the keys were handed over and the lease began) to file the lawsuit for voidability. If the judge rules in her favor, the contract will be annulled retroactively, forcing the landlord to return the €4,500 and to compensate María for the damages caused.

Practical Steps: How to Claim the Invalidation of a Contract Step-by-Step

If you find yourself facing a contract that you consider null or voidable, you must follow an orderly legal strategy to ensure the success of your claim in Spain, in accordance with the Ley de Enjuiciamiento Civil (LEC - Civil Procedure Act).

Step 1: Gathering Evidence and Analyzing the Contract

Before taking any steps, gather all documentation: the original signed contract, proof of payment (transfers of deposits, down payments, etc.), emails, WhatsApp messages, and advertising brochures that prove the deceit or the lack of essential requirements.

Step 2: Prior Extrajudicial Claim (Burofax)

Although not always mandatory, it is highly recommended to send a burofax (a secure registered letter service with certified content and proof of delivery) to the other party. In this document, you must clearly state the cause of nullity or voidability detected and request an amicable resolution of the contract, setting a deadline (usually 10 to 15 business days) for the return of the amounts paid.

Step 3: Determining the Amount and Judicial Jurisdiction

If the amicable route fails, you must resort to civil judicial proceedings. According to the Ley de Enjuiciamiento Civil (LEC), you must determine the type of procedure based on the value of the claim:

Step 4: Filing the Judicial Lawsuit

The lawsuit for nullity or voidability must be drafted by a lawyer and filed before the Juzgados de Primera Instancia (Courts of First Instance) of the defendant's domicile or the place where the property is located (according to the jurisdiction rules of the LEC). The intervention of an Abogado (lawyer) and a Procurador (court representative) is mandatory whenever the value of the lawsuit exceeds €2,000.

Step 5: Execution of the Judgment (Restitution Effect)

Once the judge issues a ruling declaring the nullity or voidability, Article 1303 of the Código Civil applies: the contracting parties must reciprocally restore to each other the things that were the subject of the contract, with their fruits, and the price with interest. If the other party refuses to pay voluntarily, you must request the execution of the judgment before the same court.

Mistakes You Must Avoid

Frequently Asked Questions (FAQ)

What happens if a rental contract has null clauses? Is the entire contract annulled?

Not necessarily. In Spanish contract law, the principle of preservation of contracts rules. If a rental contract contains a clause contrary to the Ley de Arrendamientos Urbanos (LAU - Urban Leases Act), such as forcing the tenant to stay for 1 full year without the possibility of withdrawing after 6 months, only that specific clause will be declared null (partial nullity). The rest of the rental contract will remain fully valid and binding for both parties.

Can a judge declare the nullity of a contract de oficio (on their own motion)?

Yes, in the case of absolute nullity. If a judge detects during a judicial proceeding that the contract on which the claim is based flagrantly violates a mandatory rule (for example, a usurious contract with exorbitant interest rates or an illegal business), they can declare its nullity de oficio, meaning without any of the parties having expressly requested it. This never happens with voidability, which must be requested by the injured party.

Can a voidable contract be validated or fixed?

Yes. The Código Civil allows the confirmation of voidable contracts (Article 1311 CC). Confirmation can be done expressly (through a new document where the parties remedy the defect) or tacitly (when the party who had the right to invoke voidability performs an act that necessarily implies the waiver of their right, such as continuing to pay the installments without protesting once they have already discovered the deceit).

If I am a foreigner and do not understand Spanish well, can I request the voidability of the contract due to error?

Yes, it is possible, but Spanish courts are very strict about this. For an error to invalidate consent, it must be an "essential and excusable" error. If you signed a complex contract in Spanish without seeking the help of a translator or a legal advisor, the court might consider that you acted with a lack of due diligence and deny the voidability. Therefore, it is vital to have preventive advice in your own language before signing.

Summary

General legal information, not personalised legal advice. For your specific situation, ask your question for free at AbogadoAI — answers grounded in Spanish law (BOE), in English.

Have a specific legal question?

Ask AbogadoAI and get an answer based on Spanish law (BOE), with sources — in English.

Ask for free

This is general information, not legal advice. Verify on the BOE or consult a lawyer for your specific case.