- Two different offences. Entering or staying in someone's morada (dwelling) is allanamiento de morada (art. 202 Código Penal): 6 months to 2 years in prison. Occupying a property that is nobody's dwelling is usurpación (art. 245.2): a fine of 3 to 6 months.
- The police can enter and remove occupants without a court order only with consent or in a flagrante delito (art. 18.2 of the Constitution). Report an occupation the moment you discover it.
- Fast-track trials: since 3 April 2025 (Ley Orgánica 1/2025) allanamiento and violent usurpación can go through the juicio rápido. The everyday non-violent usurpación goes through the minor-offences trial instead, according to the State Prosecutor's Circular 1/2025.
- The civil express claim (LEC art. 250.1.4º, added by Ley 5/2018) is open to individual owners, non-profits and public social-housing bodies. Occupants get 5 days to show a title; if they can't, the court can order them out. It must be filed within one year of the occupation.
- Buying: visit, check the nota simple, ask the community administrator, and write vacant possession (libre de ocupantes) into the arras contract and the deed.
What counts as okupación
An okupa (also spelled ocupa) is someone who moves into a property, or stays in it, without the owner's consent and without any title such as a lease. There is no single "okupa law": the answer depends on which offence the facts fit, and on which of three legal routes the owner uses. Two cases are not okupación at all, even though Spanish media often lump them together:
- A tenant who stops paying rent. The tenant came in with a lease, so this is a tenancy eviction (desahucio por falta de pago) under the civil procedure rules. See our guide to eviction in Spain.
- A tenant who stays after the lease ends (desahucio por precario or expiry of the term). Also civil, also covered in the eviction guide.
The popular belief that squatters "gain rights after 48 hours" does not come from any article of law. What protects occupants after the first moments is the constitutional rule that a home (domicilio) is inviolable: under article 18.2 of the Spanish Constitution nobody may enter it without the occupant's consent or a court order, except in a flagrant crime. Once occupants are living there, the police usually need a judge.
Allanamiento de morada vs usurpación
The decisive question is whether the property is someone's morada: a place where a person lives, including a second home they use. Courts decide this on the facts, so a holiday home that is visibly furnished and used is in a much stronger position than a flat that has stood empty for years or a bank-owned repossession.
| Allanamiento de morada | Usurpación without violence | Usurpación with violence or intimidation | |
|---|---|---|---|
| Criminal Code | Art. 202.1 (202.2 with violence) | Art. 245.2 | Art. 245.1 |
| What is occupied | A dwelling someone lives in, including a second home in use | A property, home or building that is not anyone's dwelling | Any property, taken by force or threats |
| Penalty | Prison 6 months to 2 years; 1 to 4 years plus a fine with violence | Fine of 3 to 6 months (day-fine system) | Prison 1 to 2 years, plus the penalty for the violence |
| Criminal procedure since 3 April 2025 | Fast-track trial (juicio rápido) if art. 795 LECrim conditions are met; otherwise jury court | Minor-offences trial (juicio sobre delitos leves, arts. 964 ff. LECrim) | Fast-track trial if art. 795 LECrim conditions are met |
For a typical foreign owner, the honest summary is this: if squatters get into a holiday home you actively use, you have the strongest protection the law offers. If they get into a property that is empty and unfurnished, you are usually dealing with the minor offence of usurpación and, in practice, with a civil claim.
What the police can do
The police can remove occupants at once when the occupation is a flagrante delito: a crime being committed or just committed, with the occupants caught in the act or immediately afterwards. Article 795 of the Criminal Procedure Act (LECrim) uses exactly that definition. That is why speed matters: a neighbour who calls the police the night the door is forced gives them something to act on; an owner who finds out three months later usually does not.
Outside a flagrant case, the police take a report (denuncia), identify the occupants if they can, and pass it to the duty court. The owner then needs a court decision, in the criminal or the civil route below.
The fast-track criminal route after Ley Orgánica 1/2025
Ley Orgánica 1/2025, on the efficiency of the public justice service, took effect on 3 April 2025. It added two letters to article 795.1.2ª of the LECrim: "i) Delitos de allanamiento de morada del artículo 202" and "j) Delitos de usurpación del artículo 245". Those offences can now be handled through the procedimiento para el enjuiciamiento rápido, the fast-track trial heard by the duty court.
Two limits matter in practice:
- The fast track needs a police report and a suspect. Article 795 only applies where the case starts with a police atestado and the police have detained the suspect or summoned them to appear before the duty court, and the case is expected to be simple to investigate.
- Non-violent usurpación is a minor offence. The State Prosecutor's Circular 1/2025 (26 June 2025) tells prosecutors that the minor offence of occupying property in article 245.2 goes through the trial for minor offences (juicio sobre delitos leves), while allanamiento (art. 202) and violent usurpación (art. 245.1) use the fast track when the article 795 conditions are met.
In the criminal route the prosecutor or the owner's lawyer can also ask the judge for an interim order to vacate (a medida cautelar de desalojo) while the case runs. Whether one is granted, and how quickly, depends on the court.
The civil express claim (Ley 5/2018)
Ley 5/2018 added a fast civil claim to recover a home, now in article 250.1.4º of the Civil Procedure Act (LEC). It is often the more predictable route for an owner of an empty property.
| Point | What the LEC says |
|---|---|
| Who can use it | Individuals who own the home or possess it lawfully, non-profit entities entitled to possess it, and public bodies that own or lawfully possess social housing (art. 250.1.4º). Companies, banks and investment funds cannot. |
| Against whom | Whoever is living there; the claim can also be served on unknown occupants, and the court officer can be accompanied by the police to identify them (art. 441.1 bis). |
| The key step | If the owner asks for immediate possession, the occupants are required to produce a title justifying their occupation within 5 days. If they don't, the court orders by auto that they leave and the home is handed back, with no appeal against that order (art. 441.1 bis). |
| What the occupants can argue | Only that they have a sufficient title to possess the home, or that the claimant has none (art. 444.1 bis). |
| Time limit | Claims to keep or recover possession are not admitted more than one year after the occupation (art. 439.1). |
| What the claim must state | Whether the property is the occupants' habitual home and whether the claimant is a large holder (gran tenedor). An owner who says they are not a large holder must attach a Land Registry certificate listing their properties (art. 439.6, added by the 2023 housing law). |
A gran tenedor is a person or company that owns more than ten urban residential properties or more than 1,500 m² of residential floor space, excluding garages and storerooms; a region can lower the threshold to five homes inside a declared stressed housing area (Ley 12/2023, art. 3.k).
Registered owners who cannot use the express claim, such as companies, still have the summary claim of article 250.1.7º LEC for rights recorded in the Land Registry, and the ordinary claim to recover ownership (acción reivindicatoria). Both are slower.
Vulnerable occupants and suspensions
Where the home is the occupants' habitual residence, the court must tell them how to contact the regional and local social services, and must itself notify those services so they can assess vulnerability and propose alternative housing (LEC art. 441.5, as reworded by the 2023 housing law, Ley 12/2023). If vulnerability is confirmed, the court can suspend the case for up to two months if the owner is an individual, or four months if the owner is a company (art. 441.6).
Separately, since 2020 a temporary decree-law power (article 1 bis of Real Decreto-ley 11/2020) has let judges suspend the removal of economically vulnerable occupants without title, but only where the home belongs to a company or to an individual with more than ten homes. It never applies to a home that is an individual owner's habitual residence or second home, to occupations involving violence or intimidation, or where the home is used for illegal activity (art. 1 bis.7). Its end date has been extended and challenged repeatedly: the BOE's consolidated text, last updated 28 February 2026, gives 31 December 2025, after Congress voted down the decree-laws that would have extended it through 2026 (Real Decreto-ley 16/2025 and Real Decreto-ley 2/2026). Ask your lawyer whether any suspension power is in force on the date you act.
How to check a property isn't occupied before you buy
- Visit in person, or send someone you trust, and see inside every room. Signs of occupation: post in other names, utilities running in an "empty" flat, new locks, a reinforced door.
- Visit more than once, including an evening or a weekend, if the property has been empty for a while.
- Read the nota simple. Registered leases and notes of pending court claims (anotaciones preventivas de demanda) appear there. Informal occupation does not.
- Ask the community administrator (administrador de fincas) whether the flat is occupied and whether community fees are up to date. A run of unpaid fees on an "empty" flat is a warning sign.
- Talk to neighbours. They usually know more than the agent.
- Write it into the contract. Your lawyer can make vacant possession (libre de ocupantes y arrendatarios) a condition of the arras contract and the deed, with the right to withdraw and recover your deposit if it isn't met.
- Visit again just before completion and take the keys at the notary, not later.
Once it is yours, the practical protections are the boring ones: an alarm, a neighbour or key holder who looks in, regular visits, and evidence that you use the home (bills, a home insurance policy, photos), because whether it counts as your morada may decide how fast you get it back.
Buying a property sold as "ocupada"
Portals list homes as ocupada, sin posesión or vivienda ocupada, often well below market price and usually sold by banks and funds. The discount pays for real costs and risks that pass to you:
- You can't inspect it or get a survey, so the condition is unknown.
- You take on the eviction, its legal costs and its timetable.
- The one-year clock may have run. The summary possession claims, including the civil express claim, must be brought within a year of the occupation itself (LEC art. 439.1). If the home was occupied long before you buy, your lawyer may have to use the slower ordinary claim.
- Vulnerability checks can add months where the occupants live there as their home.
- Lenders generally won't lend on an occupied home, so these are cash purchases.
- Debts may come with it: unpaid community fees and IBI can attach to the property.
These deals suit investors with local legal support and cash. For a home to live in or let, they are rarely a shortcut. For the other legal traps that catch buyers, see our list of pitfalls of buying property in Spain.
Step by step
Check before you commit
Visit inside more than once, read the nota simple, and ask the community administrator and neighbours.
Make vacant possession a condition
Your lawyer writes "libre de ocupantes" into the arras contract and the deed, with a right to your deposit back.
Take the keys at the notary
Visit again just before completion and collect the keys at signing.
If it happens, report at once
Call the police immediately with your deed or nota simple. Speed decides whether it is a flagrant crime.
Choose the legal route
With a lawyer: criminal complaint, the civil express claim within one year, or the ordinary claim.
- BOE: Código Penal (arts. 202 and 245)
- BOE: Ley de Enjuiciamiento Criminal (art. 795)
- BOE: Ley de Enjuiciamiento Civil (arts. 250.1.4º, 439, 441, 444)
- BOE: Ley Orgánica 1/2025, de medidas en materia de eficiencia del Servicio Público de Justicia
- BOE: Circular 1/2025 de la Fiscalía General del Estado sobre usurpación y allanamiento de morada
- BOE: Ley 5/2018 (civil recovery of occupied housing)
- BOE: Ley 12/2023 por el derecho a la vivienda (art. 3.k, gran tenedor)
- BOE: Real Decreto-ley 11/2020, consolidated text (art. 1 bis)
- BOE: Constitución Española (art. 18.2)