Skip to content
Alonso Sala
CRIMINAL LAWYERS
Legal Analysis

Trespass & Home Invasion: Criminal Defence Guide in Spain

February 10, 2026Updated: 

Criminal trespass to a dwelling (allanamiento de morada, Art. 202 CP) punishes entering another person's home or remaining there against the occupant's will, with 6 months to 2 years in prison, rising to 1 to 4 years and a fine of 6 to 12 months where the entry is carried out with violence or intimidation (Art. 202.2 CP), which is the only aggravated form the provision contains; it protects the privacy of whoever actually lives in the property, not the legal owner. This means a landlord cannot enter a rented home without the tenant's consent, and even an owner cannot forcibly remove an unlawful occupant who has settled in on a stable basis — the law channels that situation through the eviction procedure instead. The most effective defence is showing that the occupant gave express or tacit consent to entry, or that the location does not legally qualify as a dwelling.

Need help with your case? Talk to a criminal defense lawyer at Alonso Sala.

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. The penalty is 6 months to 2 years in prison for the basic offence of Art. 202.1 CP, rising to 1 to 4 years in prison and a fine of 6 to 12 months where the act is carried out with violence or intimidation (Art. 202.2 CP).

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 the act is carried out with violence or intimidation, the penalty rises to 1 to 4 years in prison plus a fine of 6 to 12 months (Art. 202.2 CP).

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

What penalty does trespass to a dwelling carry?

The short answer: 6 months to 2 years in prison for the basic offence, and 1 to 4 years in prison plus a fine of 6 to 12 months where violence or intimidation is used. This is the full scale, depending on which provision applies:

  • Art. 202.1 CP — entering or remaining in another person's dwelling: 6 months to 2 years in prison for a private individual who, without living there, enters another person's dwelling or remains in it against the occupant's will.
  • Art. 202.2 CP — with violence or intimidation: 1 to 4 years in prison and a fine of 6 to 12 months. This is the only aggravated form the provision contains.
  • Art. 203.1 CP — entering the home of a legal person, a professional practice, an office or an establishment outside opening hours: 6 months to 1 year in prison and a fine of 6 to 10 months.
  • Art. 203.2 CP — remaining in those same places outside opening hours: a fine of 1 to 3 months.
  • Art. 203.3 CP — entering or remaining in them with violence or intimidation: 6 months to 3 years in prison.
  • Art. 204 CP — authority or public official: anyone who commits those acts outside the cases permitted by law and without lawful grounds arising from an offence receives the corresponding penalty in its upper half plus absolute disqualification for 6 to 12 years.

What decides whether you go to prison. The range for the basic offence (a maximum of 2 years) leaves room to seek suspension of the custodial sentence, which art. 80 CP reserves for sentences of no more than two years and which requires, among other conditions, that the convicted person is a first-time offender and that civil liability has been settled. That is why the real battle is usually to avoid the case being classified under art. 202.2 CP: if the sentence actually imposed exceeds two years, that route closes. As for limitation, both paragraphs of art. 202 CP carry maximum penalties below five years, so the offence becomes time-barred after 5 years (art. 131.1 CP).

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 practices, offices and the premises of legal persons are protected separately, by Art. 203 CP. Entering them against the will of the holder is an offence: Art. 203.1 CP imposes 6 months to 1 year in prison and a fine of 6 to 10 months, penalties that apply cumulatively.

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

Art. 202.2 CP contains a single aggravated form: that the act be carried out with violence or intimidation. In that case the penalty is 1 to 4 years in prison and a fine of 6 to 12 months.

  • Violence: Forcing the door, breaking a window, pushing the occupant aside to get in.
  • Intimidation: Threatening the occupant into opening up or into letting you stay inside.

No other circumstance aggravates Art. 202 CP: night-time and the use of weapons do not appear in the provision and can only be weighed, where appropriate, through the general aggravating circumstances of Art. 22 CP or through any separate offence that is committed. And an authority or public official who trespasses outside the cases permitted by law is not liable under Art. 202.2, but under Art. 204 CP: the penalty of Art. 202 in its upper half plus absolute disqualification for 6 to 12 years.

Unlawful remaining (Article 202.1)

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

Frequently asked questions

What does Article 202 of the Criminal Code punish?

It punishes a private individual who, without living there, enters another person's dwelling or remains there against the occupant's will. The penalty is 6 months to 2 years in prison; if the act is carried out with violence or intimidation, 1 to 4 years in prison and a fine of 6 to 12 months.

Is it trespass to enter my ex-partner's home?

It can be. If the home is no longer shared and you enter or remain there against the will of whoever lives there, Art. 202 CP applies, even if you still keep keys or remain listed on the contract or the title deed.

What penalty does trespass to a dwelling carry?

6 months to 2 years in prison for the basic offence (Art. 202.1 CP). If violence or intimidation is used, 1 to 4 years in prison and a fine of 6 to 12 months (Art. 202.2 CP). Trespass affecting the home of a legal person, an office, workplace or establishment is punished separately under Art. 203 CP.

What is the difference between trespass to a dwelling and unlawful occupation?

Trespass to a dwelling (Art. 202 CP) requires entering or remaining in a home that constitutes another person's dwelling against their will; it protects the privacy of the home. Unlawful occupation is punished as usurpación (Art. 245 CP) and applies to property that does not constitute a dwelling, such as an empty second home or vacant commercial premises. The key is whether the property is someone's actual home: if so, Art. 202 CP applies; if it is empty and not a dwelling, Art. 245 CP applies.

How much penalty applies to each form of trespass to a dwelling?

Basic trespass under Art. 202.1 CP is punished with 6 months to 2 years in prison. If committed with violence or intimidation, Art. 202.2 CP raises the penalty to 1 to 4 years in prison and a fine of 6 to 12 months. Where the act affects the home of a legal person, an office, workplace, commercial premises or a venue open to the public outside opening hours, Art. 203 CP applies.

When does the offence of trespass to a dwelling become time-barred?

The limitation period is calculated according to the maximum penalty set for each subtype, under Art. 131 CP. Basic trespass under Art. 202.1 CP (maximum two years in prison) and the form with violence or intimidation under Art. 202.2 CP (maximum four years) become time-barred after five years, as offences whose maximum penalty does not reach five years. The period runs from when the offence is committed; for unlawful remaining, from when the unlawful situation ends.

Is a prior complaint needed to prosecute trespass to a dwelling?

No. Trespass to a dwelling under Arts. 202 to 204 CP is a public offence, so it does not require a complaint from the affected person as a condition for prosecution and can be pursued ex officio. This differs from the offences of unlawful disclosure of secrets under Art. 197 CP, which under Art. 201 CP do require a complaint from the victim to start proceedings.

What penalty applies to a public official or authority who trespasses on a dwelling?

An authority or public official who, outside the cases permitted by law and without lawful grounds arising from an offence, commits any of the acts of trespass described in Arts. 202 and 203 CP is liable under Art. 204 CP. This provision imposes the penalties set out in those articles in their upper half, plus absolute disqualification for 6 to 12 years. It is an aggravated form based on abuse of public office that reinforces protection of the inviolability of the home.

What is burglary of an inhabited dwelling and how does it differ from trespass?

Burglary of an inhabited dwelling (robo en casa habitada, Art. 241 CP) requires taking another person's movable property inside a home that constitutes a dwelling, using force on objects, and is punished with 2 to 5 years in prison. Trespass to a dwelling (Art. 202 CP) protects only the privacy of the home and does not require taking anything: it is enough to enter or remain in another person's dwelling against the occupant's will, punished with 6 months to 2 years in prison. The difference lies in the intent to take property: if, on top of entering without permission, the offender takes property by forcing entry, the conduct is assessed as burglary of an inhabited dwelling under Art. 241 CP, more serious than simple trespass.

Does an owner who forcibly enters to remove squatters commit trespass?

They can. When the occupied property has become the squatter's actual dwelling, forcibly entering it against their will falls within trespass to a dwelling under Art. 202 CP, even if the person entering is the owner. If the property is not anyone's dwelling, such as an empty second home or commercial premises, the occupation is pursued as unlawful occupation under Art. 245 CP, but recovering possession is a matter for the judicial procedure: the owner cannot take the law into their own hands by forcing entry.

Do you go to prison for trespass to a dwelling?

Not necessarily. The basic offence under Art. 202.1 CP carries 6 months to 2 years in prison, and Art. 80 CP allows the court to suspend enforcement of custodial sentences of no more than two years where the convicted person is a first-time offender and civil liability has been settled, among other conditions. Suspension is not automatic: it is granted by the court in a reasoned decision. If the acts are classified under Art. 202.2 CP (violence or intimidation), the penalty is 1 to 4 years plus a fine of 6 to 12 months, and a sentence of more than two years rules that possibility out.

Do you need criminal defense in this area?

We are criminal defense lawyers specializing in trespass. We act urgently to protect your rights.

View expertise

Related Articles

View all

Before you act, speak to a criminal defence lawyer.

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