The question every urban explorer asks before entering an abandoned building: is urbex legal in Spain? The short answer is that urban exploration is not explicitly prohibited by any Spanish law — but entering certain spaces without authorization can constitute a crime or an offense depending on the circumstances. This guide explains exactly what the law says, which situations pose real risk, and how to explore responsibly and with the minimum possible legal risk.
The Law Does Not Explicitly Prohibit Urbex
There is no specific law in Spain that prohibits "urban exploration" or "urbex" as an activity. What exists are general rules about property, access, and safety that can apply to exploring abandoned buildings depending on the specific circumstances of each case. Urbex itself — visiting, photographing, documenting — is not a crime. What can be a crime is the way of accessing the space or what is done inside it.
Home Invasion: the Main Legal Risk
Article 202 of the Spanish Penal Code classifies home invasion as a crime: "Anyone who, without living there, enters someone else's home or remains there against the will of its occupant, shall be punished with imprisonment from six months to two years." The key word is home — Spanish courts have interpreted that a habitual residence, even if temporarily empty, is still considered a home for criminal purposes. An abandoned building without active residential use is not technically a home, which significantly reduces the criminal risk for most urbex abandonments.
Private Property: Administrative Offense, Not Always Criminal
Most abandoned buildings in Spain are privately owned — estates, factories, hospitals. Entering a private space without the owner's permission that is not a residence can constitute an administrative offense under the Citizen Security Law (known as the "Gag Law"), with fines ranging from 100 to 600 euros. It is not a criminal offense, but it can result in a financial penalty. The administrative offense requires the authority to catch you in the act — the real risk depends on whether the place is monitored or if there is police presence in the area.
The Practical Rule: If There Is a Fence or Sign, Do Not Enter
The simplest way to assess the legal risk of an abandoned place is to see if there is an explicit no-access sign. If there is a fence, chain, "No Entry" sign, or any other indicator that the owner does not want visitors, entering significantly increases both criminal and administrative risk — because it shows entry was against the express will of the owner or manager. If access is open, without physical obstacles or signage, the risk is minimal even if the property is private.
Protected Heritage: BIC and Historical Complexes
Buildings declared Cultural Heritage Sites (BIC) or included in Historical-Artistic Complexes have specific protection under Law 16/1985 of Spanish Historical Heritage and regional heritage laws. Damaging, looting, or altering a protected site may constitute a crime against historical heritage under articles 321-324 of the Penal Code, with penalties of up to four years in prison. Visiting itself, without damage or removal of elements, is not expressly prohibited by heritage law — but it is the context where legal risk is highest if something goes wrong.
Military Installations: Specific Risk
Abandoned military installations — barracks, coastal batteries, powder magazines — are property of the Ministry of Defense and unauthorized access is regulated by specific national security legislation. Entering an abandoned military installation without authorization may constitute a crime under the Military Penal Code, regardless of the building’s state of abandonment. The rule is absolute: military installations are always photographed from the outside, never entered.
Vandalism and Damage: The Only Clear Crime in Urbex
The only act that unequivocally turns urbex into a crime is causing damage — painting graffiti, breaking locks, removing architectural elements, or deliberately damaging the building. Articles 263-267 of the Penal Code classify damage to private property with penalties ranging from fines to imprisonment depending on the value of the damage. The responsible urbex code of ethics — "take nothing, leave nothing, damage nothing" — is also the best legal protection: an explorer who causes no damage has a completely different criminal profile than a vandal.
Summary: The Urbex Risk Map in Spain
| Situation | Legal risk | Possible consequence |
|---|---|---|
| Building without fence or sign, private property not a dwelling | Low | Possible administrative infraction |
| Fenced building or with prohibition sign | Medium | Fine €100-600 (Gag Law) |
| Temporarily unoccupied inhabited dwelling | High | Trespassing crime, prison 6 months–2 years |
| Cultural Heritage Site with damage | High | Heritage crime, prison up to 4 years |
| Military installation | Very high | Military Penal Code |
| Managed space with free visit (Granadilla, Corbera) | None | No risk if schedules are respected |
Five Rules for Exploring with Minimal Legal Risk
- Do not force any access — never break a lock, climb a fence, or remove a padlock; forced access automatically increases legal risk
- Respect signage — if there is a prohibition sign, do not enter even if physically possible
- Do not cause any damage — the urbex code of ethics is also your best legal defense
- Do not take anything — removing items from an abandoned building may constitute theft or heritage plundering
- Never enter military facilities — this rule is absolute, without exception
❓ Frequently Asked Questions
Can I be detained for doing urbex in Spain?
Technically yes, if you enter a private space with prohibition signs or a military facility. In practice, the Police and Civil Guard prioritize higher-risk situations — an explorer who causes no damage or disturbance is rarely detained. The real risk is an administrative fine (€100-600) if caught on fenced private property, not detention.
Is the legal risk different in each autonomous community?
Yes — regional heritage laws add a specific layer of protection for protected assets in each community. Catalonia, the Basque Country, and Andalusia have especially active heritage legislation. Additionally, municipal ordinances may set specific restrictions in certain areas. The Penal Code and Citizen Security Law apply nationally.
Can I post photos of an abandoned building on social media?
Yes — photography itself is not illegal, and publishing photos of an abandoned building is not either, even if the building is private property. Intellectual property law protects architectural works, but general doctrine allows photographing buildings from public spaces or from inside if entry was legal. The only potential risk is that photos prove you accessed a prohibited area.
The Safest Solution: Verified GPS Coordinates
The most effective way to do urbex legally and safely in Spain is to use verified GPS coordinates that include information about the type of property, access status, and specific restrictions for each spot. Our Urbex Spain Map includes this information for each of the 600+ locations — so you never get a surprise when you arrive.
Urbex Spain Map — 600+ Verified GPS Locations
- ✓ Updated access status for each spot
- ✓ Public or private property indication
- ✓ Instant access after purchase
- ✓ Free updates forever
€29.99
See 600+ Locations →



