Renting & housing

Can a Landlord Change the Locks in Spain? What is Legal

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

🇪🇸 Read the original in Spanish

The rental market in Spain constantly generates doubts and friction between landlords and tenants, with access to the property being one of the most conflict-prone areas. One of the most recurring questions that generates the most tension in situations of non-payment or disagreement is: can a landlord change the locks of a rented property? The short and resounding answer is no, under no unilateral circumstances, even if the tenant does not pay the rent. Below, we analyze in depth the Spanish legal framework, the serious criminal consequences for a landlord who takes the law into their own hands, and the legal mechanisms that actually exist to resolve rental disputes.

Under Spanish law, the home is inviolable. Once a lease agreement is signed and the keys are handed over, possession of the property is transferred to the tenant. This means that, even if the landlord retains registered ownership of the flat, they lose the right to use and enjoy it for the duration of the contract.

Spanish legislation fiercely protects the tenant's possession and dwelling through several statutory texts:

1. The Spanish Constitution (CE)

Article 18.2 of the Constitución Española (Spanish Constitution) establishes that "the home is inviolable. No entry or search may be made in it without the consent of the owner or a judicial resolution". From the moment the tenant moves into the flat, it becomes their constitutional home, which is protected even against the owner themselves.

2. The Urban Leasing Act (LAU)

The Ley 29/1994, de 24 de noviembre, de Arrendamientos Urbanos (the Ley de Arrendamientos Urbanos or LAU / Urban Leasing Act) regulates the rights and duties of both parties. Article 21.1 of the LAU imposes an obligation on the landlord to carry out all necessary repairs to maintain the property in habitable conditions for its agreed use. Preventing access by changing the locks is a direct violation of this obligation to guarantee the peaceful use of the property.

3. The Civil Code (CC)

Article 1554.3 of the Código Civil (Civil Code) obliges the landlord "to maintain the tenant in the peaceful enjoyment of the lease for the entire duration of the contract". Changing the locks unilaterally and violently breaks this peaceful enjoyment.

4. The Criminal Code (CP): Criminal consequences for the landlord

This is the most critical point for property owners. Changing the locks without the tenant's consent or without a judicial eviction order is not a simple civil infraction; it is a crime. The owner could face:

What happens in case of non-payment? The Housing Law and the LEC

There is a false belief that if the tenant does not pay the rent, the contract is automatically terminated and the landlord can reclaim their flat. This is a serious mistake.

The Ley 12/2023, de 24 de mayo, por el derecho a la vivienda (Housing Law), together with the Ley de Enjuiciamiento Civil (the Ley de Enjuiciamiento Civil or LEC / Civil Procedure Act), regulate eviction processes. The non-payment of rent entitles the landlord to request the termination of the contract (according to Article 27.2.a of the LAU), but this termination must be declared by a judge.

Until a court issues an eviction ruling and executes the corresponding lanzamiento (eviction/official lockout with a judicial commission), the tenant remains the legitimate possessor of the property, even if they are a defaulting tenant.

Practical Examples: Economic and Criminal Consequences

To understand the seriousness of acting outside the law, we analyze two realistic scenarios in the Spanish rental market.

Example 1: The landlord who changes the locks due to non-payment (Criminal Route)

Practical Step-by-Step Procedures in Case of Conflict

If you are a landlord and your tenant is not paying, or if you are a tenant and your landlord is threatening to change the locks, these are the action protocols you should follow.

If you are a LANDLORD and face non-payment:

  1. Formal amicable demand: Send a burofax (certified mail with proof of delivery and content certification) to the tenant claiming the amounts owed. Grant a period of 10 days for payment. This serves to establish a legal record and prevent the enervación (the tenant's right to stop the eviction by paying the debt at the last minute) later on.
  2. Consult a specialist lawyer: If there is no response or payment within the indicated period, go to a lawyer to draft the eviction lawsuit for non-payment of rent and claim of debt.
  3. Filing the lawsuit: The lawsuit is filed in the courts of the place where the property is located, requiring the intervention of a procurador and a lawyer (mandatory if the annual rent or amount claimed exceeds 2,000 €).
  4. Await the admission decree and eviction date: The court will notify the tenant, giving them 10 days to vacate, pay (if enervación is possible), or file an opposition. The eviction date will be set in the same document.
  5. *Execution of the eviction (lanzamiento):* On the designated day, the judicial commission (together with a locksmith hired by the landlord) will go to the property to legally take possession of the premises.

If you are a TENANT and the landlord has changed your locks:

  1. Do not try to force the door: Do not try to enter by force, as the landlord could report you for damage or trespassing if they have re-occupied the property.
  2. Immediately call the Police or Civil Guard: Explain that the owner has changed the locks of your habitual home. Show the officers your rental contract, recent rent receipts, or your empadronamiento (town-hall registration certificate). The officers will write a police report (atestado) which will be crucial for the trial.
  3. *File a complaint at the duty court (juzgado de guardia): Go with the police report and proof that you resided there to report the owner for a crime of coercion and/or trespassing. Request the immediate restoration of possession (that the keys be returned to you immediately) as an urgent precautionary measure (medida cautelarísima*).
  4. Claim damages: Keep all receipts for hotels, restaurants, or furniture storage facilities that you have had to pay for due to being unable to access your home, in order to claim them financially from the landlord in the criminal or civil proceedings.

Mistakes You Must Avoid

Committing any of these errors can transform a landlord from a victim of non-payment into a defendant in a criminal court:

Frequently Asked Questions (FAQ)

What happens if the rental contract has already expired and the tenant does not leave?

Even if the lease agreement has ended (for example, due to the expiration of the mandatory extension period) and the tenant refuses to leave the property, the landlord still cannot change the locks. The tenant enters a state of tácita reconducción (implied renewal) or occupation without title, but their physical possession remains protected. The landlord must go through the civil route by filing an eviction lawsuit for expiration of the contractual term.

If the tenant authorizes me in writing in the contract to change the locks in case of non-payment, is it legal to do so?

No, that clause is null and void. Article 6 of the LAU establishes that clauses that modify the rules of the law to the detriment of the tenant are null, unless the rule itself authorizes it. Furthermore, fundamental rights (such as the inviolability of the home in Article 18.2 CE) are non-disposable and cannot be waived by private contract.

Can I change the locks if the tenant has been missing for months and the flat seems empty?

This is not recommended either. If the tenant has stopped paying but has not handed over the keys or signed the termination, they legally remain in possession of the property. If the landlord enters and changes the locks, and the tenant reappears claiming they were traveling or in the hospital, the landlord could be reported for trespassing. The only safe way is to file an eviction lawsuit and have the court officially declare the abandonment of the property.

If I am a tenant and the landlord has changed the locks, can I call a locksmith to get back in?

If you have a valid rental contract and can prove it is your home, you have the right to access your residence. However, to avoid physical conflict or cross-complaints for damage, the ideal approach is to carry out this action in the presence of the State Security Forces and Bodies (National Police or Civil Guard) so they can attest to the situation and you avoid accusations of using force on property.

In 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.