Skip to content
A
Alonso Sala
CRIMINAL LAWYERS
ES
Legal Analysis

Trespass & Home Invasion: Criminal Defense Guide in Spain

calendar_todayFebruary 10, 2026

Last updated:

The offence of allanamiento de morada (criminal trespass to a dwelling) is one of the most misunderstood offences in the Spanish Criminal Code (CP). Many people believe that owning a property gives them an absolute right to enter whenever they wish. WRONG. Trespass protects the privacy of the home, not ownership. As criminal lawyers specialising in criminal trespass, we explain when you cross the red line that can land you in prison.

What is allanamiento de morada? (Article 202 CP)

Article 202 of the Spanish Criminal Code (CP) punishes anyone who "enters another person's dwelling or remains there against the will of the occupant" with a penalty of 6 months to 2 years in prison. If violence or intimidation is used, or the offence is committed at night, the penalty rises to 1 to 4 years.

The key is understanding what counts as a "dwelling" and who is the "occupant". It is not the owner who decides, but whoever lives there on a stable basis, even if only temporarily (tenant, squatter, partner living there).

Real cases that take people by surprise

These are the most common cases we see in our office:

  • The landlord who enters without permission: Even if you own the property, if the tenant lives there you CANNOT enter without their consent. It is criminal trespass. Full stop.
  • The ex-partner with keys: Having keys does NOT entitle you to enter if you no longer live there and the other party has prohibited your entry. Even if you are co-owner.
  • The protected squatter: If a squatter is living in your property on a stable basis, the Spanish Supreme Court holds that they DO benefit from the protection of the dwelling. Entering by force is criminal trespass. You must use the express eviction procedure.
  • Entering your own home with a restraining order in place: If an order prohibits you from approaching the property, entering amounts to breach of the order plus criminal trespass (if your ex-partner lives there alone).

Key difference: trespass vs. unlawful occupation

This confusion ruins many defences. The distinction is as follows:

  • Trespass to dwelling (Article 202 CP): Entering an inhabited place without the occupant's permission. Protects privacy. Penalty: 6 months to 2 years (or 1 to 4 years if violence is used).
  • Unlawful occupation (usurpación, Article 245 CP): Occupying an empty property or depriving the owner of possession. Protects property rights. Penalty: fine of 3 to 6 months.

Practical example: If a squatter enters your house while you are away on holiday, they commit usurpación. If you, as the owner, then enter by force while the squatter is living there, you commit allanamiento (because the squatter is now the de facto occupant, even though unlawful).

What counts as a "dwelling"?

The Spanish Supreme Court has gradually refined the concept:

  • IS a dwelling: A house, flat, hotel room, inhabited caravan, boat where someone lives, university hall of residence room.
  • NOT a dwelling: An unfenced outdoor garden, the entrance hall of a building, communal staircases, commercial premises open to the public, an office with no residential use.
  • Special case - business premises: Professional offices have reduced protection (Article 203 CP). Entering without permission is still an offence, but the penalty is lower (6 months to 1 year or a fine).

The most effective defence is to show that consent existed on the part of the occupant. This may be:

  • Express: Clear verbal or written permission ("come in", "enter", a WhatsApp message inviting you).
  • Tacit: Conduct implying permission (leaving the door open, a prior invitation, a habitual relationship of trust).
  • Presumed: Emergency situations where it is reasonable to assume that the occupant would consent (firefighters entering to put out a fire, police responding to cries for help).

Important: Consent must be freely given. If it is obtained by deception ("I'm from the electricity company"), intimidation or mistake, it is NOT valid and an offence is committed.

Trespass with violence: aggravated penalty

Article 202.2 CP increases the penalty (1 to 4 years) where any of the following applies:

  • Violence or intimidation: Forcing the door, breaking a window, threatening the occupant into opening up.
  • Night-time: Committed between sunset and sunrise (greater vulnerability of the victim).
  • Use of weapons or dangerous instruments: Carrying knives, bats or any object that could be used as a weapon.
  • Public official acting outside permitted cases: A police officer who enters without judicial authorisation or legal cause.

Unlawful remaining (Article 202.2)

It is not only an offence to enter without permission. It is also an offence to refuse to leave when the occupant asks you to. Typical cases:

  • You enter a party with permission, but when the host asks you to leave, you refuse.
  • You visit a relative, you argue, they ask you to leave and you stay sitting on the sofa.
  • You enter commercial premises during opening hours and stay after closing, refusing to leave.

The penalty is the same as for unlawful entry: 6 months to 2 years.

Defence strategies in criminal proceedings

As defence lawyers, our main lines of action are:

  1. Prove consent: WhatsApp messages, witnesses, recordings, or a prior relationship demonstrating tacit or express permission.
  2. The place does not qualify: Show that the location is not a "dwelling" (e.g. an outdoor garden, open commercial premises, a communal area of a building).
  3. Joint occupancy: Show that the defendant also lives there or has a lawful right of access (e.g. a spouse still registered at the address, an adult child residing there). See our note on this point.
  4. Mistake of fact: Absence of intent due to an unavoidable mistake (e.g. entering while drunk thinking it is your own home, confusion of flats in an identical building).
  5. Nullity of evidence: If the police entered without judicial authorisation and obtained evidence, that evidence may be null and void as a breach of the fundamental right to inviolability of the home.

Key case law of the Spanish Supreme Court

Judgments we rely on in our defence work:

  • A squatter who lives in the property on a stable basis benefits from the protection of the dwelling, even though the occupation is unlawful. The owner cannot enter by force.
  • A landlord who enters a leased flat without permission commits criminal trespass, even as owner. The tenant is the protected occupant.
  • Having keys does NOT entitle you to enter if the occupant has prohibited entry. Consent must be current, not historic.
  • A hotel room is a "dwelling" while the guest occupies it, even for just one night. Hotel staff cannot enter without permission save in an emergency.
  • A permanently inhabited caravan is a dwelling. Entering without the occupant's permission is criminal trespass.

Critical advice

If you are an owner faced with a squatter, NEVER enter by force. Use the express eviction procedure (Law 5/2018). If you enter, you risk being convicted of criminal trespass while the squatter goes unpunished. The law protects the de facto occupant, not the legal owner.

Can the police enter without a judicial warrant?

Only in exceptional cases:

  • Flagrant offence: If they are chasing a suspect who has just committed an offence and that person enters a dwelling.
  • Consent of the occupant: If the occupant expressly authorises the entry.
  • Urgent situation: Cries for help, the smell of gas, visible smoke, imminent risk to life.

Outside these cases, the police MUST have judicial authorisation. If they enter without it, any evidence obtained may be null and void (the "fruit of the poisonous tree" doctrine).

Criminal and civil consequences

In addition to the prison sentence, a person convicted of criminal trespass faces:

  • Criminal record: Affecting public examinations, firearms licences and work with children.
  • Restraining order: A prohibition on approaching the victim's home (common in cases involving ex-partners).
  • Compensation for moral damages: The victim may claim for the distress caused and the breach of their privacy.
  • Civil liability for material damage: If the door was forced, windows were broken, etc.

Do you need a criminal defence lawyer?

If you are facing a criminal matter, our team of specialist criminal defence lawyers can help. Get in touch for an assessment of your case.

Related Articles

View allarrow_forward

Knowledge is power, but strategy is key.

What you read here is just the beginning. Transform information into active defense by contacting our team of experts.

call